[erlang-questions] gen_tcp and large HTTP headers

Roberto Ostinelli roberto@REDACTED
Thu Jun 23 10:54:00 CEST 2011


2011/6/23 Paolo Negri <paolo.negri@REDACTED>

> Hi Everyone,
>
> Thanks for discussing this, we encountered the problem on our system
> and filed the bug that originated Roberto's email [1].
>

indeed, i didn't refer you because i didn't associate the nickname
'hungryblank' to you :)



> We're currently working around the problem by setting recbuf on the
> socket, this temporary solution is not too bad in real life if the
> need is only to cope with requests originated by browsers as currently
> fairly popular ones can't handle over 2048 characters [2].
>

i agree that recbuf can provide a solution on GET urls, however as seen on
cowboy's issues list the same does apply on other headers, such as long
Cookies for instance.

ps: i've provided a patch exactly to do this, is it the one you're using or
have you patched misultin yourself?


> While this is suitable as a temporary solution it really feels like
> the current implementation of inet is incorrect as it states "The
> packets are returned with the format according to HttpPacket described
> in erlang:decode_packet/3" [3] and instead the results are different
> from those one would get by calling erlang:decode_packet/3
>
> [1] https://github.com/ostinelli/misultin/issues/40
> [2] http://support.microsoft.com/kb/208427
> [3] http://www.erlang.org/doc/man/inet.html#setopts-2
>
> Thanks,
>
> Paolo
>

let's see if the OTP team pops in in this discussion. it probably is a known
issue.

r.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110623/3ed9ef09/attachment.htm>


More information about the erlang-questions mailing list