Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Max request size to 1GB (mochiweb)

  • Loading branch information...
commit a407b2a6ece9a7a764ce1e5665e80fd216609261 1 parent 3cf0d27
@choptastic choptastic authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/mochiweb_bridge_modules/mochiweb_request_bridge.erl
View
5 src/mochiweb_bridge_modules/mochiweb_request_bridge.erl
@@ -14,6 +14,9 @@
socket/1, recv_from_socket/3
]).
+%% Mochiweb's max request size is 1MB, let's updated it to 1GB
+-define(MAX_BODY_SIZE, (1024*1024*1024)).
+
init({Req, DocRoot}) ->
{Req, DocRoot}.
@@ -74,7 +77,7 @@ post_params({Req, _DocRoot}) ->
Req:parse_post().
request_body({Req, _DocRoot}) ->
- Req:recv_body().
+ Req:recv_body(?MAX_BODY_SIZE).
socket({Req, _DocRoot}) ->
Req:get(socket).
Please sign in to comment.
Something went wrong with that request. Please try again.