Closed GoogleCodeExporter closed 8 years ago
This patch doesn't look quite correct to me, what if the client sends too much
data? I think a more robust
solution will be more complicated.
Original comment by bob.ippo...@gmail.com
on 10 Nov 2009 at 2:49
Hi Bob, good point. Here's an updated patch that checks the size of the
received data before applying the Fun
Original comment by adam.kocoloski@gmail.com
on 10 Nov 2009 at 3:20
bah, bad patch ... here's the right one
Original comment by adam.kocoloski@gmail.com
on 10 Nov 2009 at 3:22
Attachments:
[deleted comment]
But is it an error if the client pipelines two HTTP requests back to back? Most
HTTP servers would handle this
gracefully wouldn't they? mochiweb currently should (other than the potential
timeout issue).
Original comment by bob.ippo...@gmail.com
on 10 Nov 2009 at 3:22
Sorry, not sure I follow ... are you thinking of GET requests with bodies, or
PUT/POST requests that are pipelined?
Both are unusual and I think the latter is a SHOULD NOT in the RFC. I do see
how pipelined requests with bodies
would be troublesome with this patch.
Original comment by adam.kocoloski@gmail.com
on 10 Nov 2009 at 3:26
I think that it's possible to have an idempotent PUT request with a body that
is pipelined, however rare it may be.
Original comment by bob.ippo...@gmail.com
on 10 Nov 2009 at 3:35
You're quite right, idempotence is what matters, and taking care to handle that
use case will complicate things.
Original comment by adam.kocoloski@gmail.com
on 10 Nov 2009 at 3:42
Don't know how you feel about undocumented OTP features, but gen_tcp exports an
unrecv/2 that seems to be
exactly what is needed here. This patch puts the extra data back on the socket
if it ends up reading too much.
Still need to come up with a test that actually hits this code path.
Original comment by adam.kocoloski@gmail.com
on 11 Nov 2009 at 2:32
Attachments:
applied in r113
Original comment by bob.ippo...@gmail.com
on 15 Nov 2009 at 10:03
Original issue reported on code.google.com by
adam.kocoloski@gmail.com
on 10 Nov 2009 at 2:35Attachments: