[erlang-questions] Cowboy/giallo {error,badlength}
Dmitrii Dimandt
dmitrii@REDACTED
Wed May 15 16:56:46 CEST 2013
> Comments interspersed.
> > I have a very small and very stupid question about Cowboy (or, perhaps, giallo? )
> That would be giallo.
>
> > giallo:post_param(<<"param_name">>, Req) returns {error, badlength} for rather short texts (I really need to post much larger texts).
>
> > How can I raise the limit on the body length?
> You've hit the default MaxBodyLength of 16kb: https://github.com/extend/cowboy/blob/master/guide/req.md#request-body
>
> I've just pushed a new version with a post_param/4 which lets you optionally specify your own MaxBodyLength or the atom infinity to ignore the body_length check.
Awesome!
> Remember that the body_length check was added to cowboy to mitigate a possible DoS scenario: https://gist.github.com/josevalim/eea34c1c76056d2fdf4f
>
Yes, I saw that one as well. I wonder if this can be governed by a configuration parameter somewhere
> --
> Bip Thelin
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130515/9df013d5/attachment.htm>
More information about the erlang-questions
mailing list