Chromium Code Reviews
DescriptionImprove the handling of HTTP requests with empty body
The HTTP parser always issues a "request received" event and
a "data end" event for all requests including requests with an
empty body. The "request received" event causes the request
handler to be called and the "data end" event causes the onClosed
on the input stream to be called. If the output stream was before
the "data end" event (that is in the request handler) the HTTP
server would close the socket as the output stream was closed
before the input was read. However for requests with empty bodies
this is not really the case.
The HTTP server now tracks when a request is known to have an
empty body. When that is the case there is no need to buffer the
response data and closing the output stream bedore the "data end"
event is now handled as if the full request is already read -
which it is.
The method _checkDone is how called exactly once for each of the
"request received", "data" and "data end" events, and always as the
last thing before returning from handling the evnent.
R=ager@google.com
BUG=dart:6984, dart:7182
Committed: https://code.google.com/p/dart/source/detail?r=15951
Patch Set 1 #Patch Set 2 : Update status file #
Total comments: 2
Messages
Total messages: 3 (0 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||