Closed tmornini closed 10 years ago
I can't see anything wrong just looking at your code. This error indicates you're trying to read a request header+body at the same time you're already reading one, i.e. perhaps there's a case where you haven't fully consumed the request body before attempting to read another request.
Reel is a fully pipelined HTTP server which means its semantics are a bit more complicated than most. I'm not sure we have all the sharp edges in the API ironed out yet.
Oh, I think I know what the issue might be.
I currently read the request body post-authorization. I'll try reading it early and see if that makes the difference.
It seems weird however that the system runs perfectly until the test completes successfully. My guts tell me it's triggered when client closes a previously Kept-Alive connection.
I'll continue to investigate and update when I have new details.
I just tortured it a bit and cannot reproduce this, whereas it was 100% reproducible when I reported this. I'm putting it down to a days work refactoring toward simplicity. :-)
Hey there!
I just did my first testing with HTTP/1.1 Connection: Keep-Alive using siege 3.0.5 (which, incidentally, feels like a beast from an ancient era) like this:
siege -c 8 -b -t 1S "http://0.0.0.0:3000/v3/orgs POST < payload.json"
Siege reports 100% successful requests, but when it completes, the server crashes as below.
This could easily be something in my code, but from the backtrace it doesn't look like it. :-)
My Reel::Server::HTTP is here: https://gist.github.com/tmornini/9946289