returns 400 on requests with long get args #40

Closed
hungryblank opened this Issue Jun 22, 2011 · 2 comments

Comments

Projects
None yet
2 participants

misultin will issue a 400 when handling requests with long get parameters as the one reported at the bottom of this email

Turning on debugging this can be tracked to the warning "tcp error treating headers"
identified in the code at the following link
https://github.com/ostinelli/misultin/blob/master/src/misultin_http.erl#L191

Here's a sample request that triggers the described condition running the misultin_echo example on port 8080 on localhost specific length to trigger this condition is probably related to socket internals in our case the threshold seems to be around 1500 chars

http://127.0.0.1:8080/foo?var=foobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobar
Owner

ostinelli commented Jun 22, 2011

this sounds like an issue related to the MTU size. i'll investigate.

Owner

ostinelli commented Jun 22, 2011

hi,

to solve this issue i've added an advanced option:
recbuf: integer()

this specifies the size of the receive buffer. start misultin for example like this:

misultin:start_link([{port, Port}, {recbuf, 2048}, {loop, fun(Req) -> handle_http(Req) end}]).

you should normally have your example working now.

r.

ostinelli closed this Jun 22, 2011

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