[rabbitmq-discuss] Mochiweb MAX_RECV_BODY and JSON_RPC plugin

Gavin M. Roy gmr at myyearbook.com
Sun Sep 18 02:41:19 BST 2011


Thanks for the instructions. Please find the patch to mochiweb-wrapper patching the MAX_RECV_BODY to 100MB from 1MB.

Regards,

Gavin 


On Monday, August 22, 2011 at 5:03 AM, Simon MacMullen wrote:

> On 19/08/11 21:20, Gavin M. Roy wrote:
> > Ran into an unintended snag with JSON Channel RPC with regard to a
> > mochiweb limitation.
> > 
> > Mochiweb has a hardcoded constant for the maximum body size for a
> > request at 1MB:
> > 
> > https://github.com/mochi/mochiweb/blob/master/src/mochiweb_request.erl#L47
> > 
> > This is a problem when you're trying to POST messages that are larger
> > than 1MB.
> > 
> > The fix is relatively easy, but I wanted to find out if there was any
> > patching of mochiweb prior to making the mochiweb.ez (http://web.ez) file or is the file
> > just provided for convenience and providing a tagged supported version.
> > That is, if I recompile it with the # I want, can I just go from the
> > vanilla mochiweb repo?
> 
> We patch mochiweb a bit, to make it build on older versions of Erlang, 
> and to remove its dependency on the "crypto" application. I guess you 
> could live without these, but more importantly we also use a specific 
> version (basically what was the latest version at the point I started 
> writing rabbitmq-management) and haven't tested with newer versions.
> 
> If I were you I would add your patch to our set and build with our 
> wrapper. To do this, check out rabbitmq-public-umbrella, then check out 
> the mochiweb-wrapper repository within it:
> 
> http://hg.rabbitmq.com/mochiweb-wrapper/
> 
> (or run "make checkout" which will check out everything including 
> mochiweb-wrapper)
> 
> Then within mochiweb-wrapper add your patch, and add it to 
> WRAPPER_PATCHES in package.mk, then "make dist".
> 
> Alternatively you could build it yourself but I would try to use the 
> same version as we do - 9a53dbd7b2c52eb5b9d4 in the mochiweb git repo.
> 
> Cheers, Simon
> 
> -- 
> Simon MacMullen
> RabbitMQ, VMware
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com (mailto:rabbitmq-discuss at lists.rabbitmq.com)
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110917/19c25aba/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mochiweb-wrapper.patch
Type: application/octet-stream
Size: 985 bytes
Desc: not available
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110917/19c25aba/attachment.obj>


More information about the rabbitmq-discuss mailing list