Skip to content

Commit

Permalink
Merge branch 'klm-remove-default-rewrite-setting' into wrd-content-le…
Browse files Browse the repository at this point in the history
…ngth-with-streaming
  • Loading branch information
kellymclaughlin committed Nov 8, 2012
2 parents 98a6d0c + b0dccbe commit 1af6ae0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/webmachine_mochiweb.erl
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,15 @@ start(Options) ->
end,
application_set_unless_env(webmachine, dispatch_list, DispatchList),
application_set_unless_env(webmachine, error_handler, ErrorHandler),
application_set_unless_env(webmachine, rewrite_module, RewriteModule),
case RewriteModule of
undefined ->
%% webmachine:new_request/2 will explode if
%% application:get_env returns {ok, undefined}
ok;
_ ->
application_set_unless_env(
webmachine, rewrite_module, RewriteModule)
end,
mochiweb_http:start([{name, PName}, {loop, fun loop/1} | Options6]).

stop() ->
Expand Down

0 comments on commit 1af6ae0

Please sign in to comment.