Permalink
Browse files

Add comment for mochiweb max_request_size override

  • Loading branch information...
1 parent 34f1d92 commit e8f42d8d804c65e28124e4a31b0336ed9d317157 @choptastic committed Mar 22, 2013
Showing with 12 additions and 0 deletions.
  1. +12 −0 src/mochiweb_bridge_modules/mochiweb_request_bridge.erl
@@ -16,6 +16,18 @@
]).
%% Max Body of 10MB by default
+%% NOTE: It seems to be common for folks to manually override this directly in
+%% the code here. That, however, is not necessary. It's far simpler to set
+%% the faux-mochiweb environment variable max_reqest_size. I say "faux-mochiweb"
+%% because it isn't ACTUALLY a stock mochiweb variable, but just one that
+%% simple_bridge uses to override this hard-coded default.
+%%
+%% Either put the value into a mochiweb.config and load that, or you can
+%% just specify it in code or the console with:
+%%
+%% application:set_env(mochiweb, max_request_size, Size).
+%%
+%% where size is an integer containing the number of bytes
-define(MAX_RECV_BODY,(1024*1024*10)).
%% {Req, DocRoot} is deprecated

0 comments on commit e8f42d8

Please sign in to comment.