anchor.diff:              XReq1 = {webmachine_request,RS1},
               try
                   {ok, Resource} = BootstrapResource:wrap(Mod, ModOpts),
  -                {ok,RS2} = XReq1:set_metadata('resource_module', Mod),
  +                {ok,RS2} = XReq1:set_metadata('resource_module',
  +                                              resource_module(Mod, ModOpts)),
                   webmachine_decision_core:handle_request(Resource, RS2)
               catch
                   error:Error ->
  
positive.code:         _ -> nop
      end.
  
  
  
  get_option(Option, Options) ->
      case lists:keytake(Option, 1, Options) of
         false -> {undefined, Options};
         {value, {Option, Value}, NewOptions} -> {Value, NewOptions}
      end.
  
  application_set_unless_env(App, Var, Value) ->
      Current = application:get_all_env(App),
  
negative.code:                                       "x-forwarded-server",
                                        "host"]],
             V /= undefined].
  
  get_app_env(Key) ->
      application:get_env(webmachine, Key).
  
  %% @private
  %% @doc This function is used for cases where it may be desirable to
  %% override the value that is set in the request metadata under the
  %% `resource_module' key. An example would be a pattern where a set of
  %% resource modules shares a lot of common functionality that is
  %% contained in a single module and is used as the resource in all
  %% dispatch rules and the%% `ModOpts' are used to specify a smaller
  %% set of callbacks for resource specialization.
  resource_module(Mod, ModOpts) ->
      resource_module(Mod, ModOpts, get_app_env(resource_module_option)).
  
  resource_module(Mod, _, undefined) ->
      Mod;
  resource_module(Mod, ModOpts, {ok, OptionVal}) ->
      proplists:get_value(OptionVal, ModOpts, Mod).
  