long http headers and http error packets (zd864 + bz1291) #3

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
4 participants
@jaredmorrow

Merging a combination of Vinoski's header fix zd864 and Sean Cribbs' http error fix bz1291

vinoski and others added some commits Oct 28, 2011

fix zd864: long HTTP header lines not handled properly
Due to Erlang bug OTP-9389, the handling of HTTP request header lines
that exceed the size of the gen_tcp receive buffer is broken when
using {packet,http} and {packet,httph} modes.

Modify mochiweb to work around this bug by using {packet,line} mode
instead to collect request header lines and then using
erlang:decode_packet to parse them. Using {packet,line} allows us to
avoid reading past the headers into the request body (if present),
since doing that would require us to carry the body data from the
header handling functions over into the body handling functions, which
could be a pretty intrusive and complicated change.

Also add regression unit tests that verify that long HTTP request
lines and long HTTP header lines are handled correctly.
Merge pull request #2 from basho/bz1291-http-error-packets
BZ1291 HttpError packet parsing fix
@bsparrow435

This comment has been minimized.

Show comment
Hide comment
@bsparrow435

bsparrow435 Oct 5, 2016

Contributor

Assigning to myself to test and make sure this fix is still valid.

Contributor

bsparrow435 commented Oct 5, 2016

Assigning to myself to test and make sure this fix is still valid.

@bsparrow435 bsparrow435 self-assigned this Oct 5, 2016

@bsparrow435

This comment has been minimized.

Show comment
Hide comment
@bsparrow435

bsparrow435 Oct 5, 2016

Contributor

Closing

Contributor

bsparrow435 commented Oct 5, 2016

Closing

@bsparrow435 bsparrow435 closed this Oct 5, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment