[erlang-questions] gen_tcp and large HTTP headers

Steve Vinoski <>
Thu Jun 23 05:35:21 CEST 2011


Unfortunately, it appears that if you want to be completely safe and
handle long request lines like your example, then yes, calling
decode_packet is the only way to go. :-( I've stared at the inet
driver code some more and the way it's calling the packet parser just
doesn't allow it to be informed that a buffer is incomplete and more
data from the next packet is needed.

--steve

On Wed, Jun 22, 2011 at 6:34 PM, Roberto Ostinelli <> wrote:
> steve,
>
> your intuition is correct: version is {0, 9}.
>
> i guess the only solution is to avoid {packet, http} and handle these
> manually? seems such a waste.
>
> 2011/6/22 Steve Vinoski <>
>>
>> Looking at the packet parser, I'm thinking it always treats this case
>> as HTTP version 0.9, so that's wrong as well. Can you verify that
>> major and minor are set to 0 and 9 respectively in the version tuple
>> within the http_request tuple you get?
>



More information about the erlang-questions mailing list