Chromium Code Reviews
DescriptionFix a number of HTTP issues
The main purpose of this change is to ensure that the HTTP server
does not start sending the response before the full request have
been read. This ended up requiring a number of changes.
1. Handle server closing connection before full request is read
If the server closes the connection before the request body have
been read this will result in the underlying socket getting
closed by the server.
2. Support writing to output stream before full request is read
Changed the server to not start sending data before the full
request have been read. In order to still make it possible to
write to the request output stream before reading all data any
data written before will be buffered. When the request have been
fully read the buffered data will be written.
3. Handle of bad/closed connections retreived from the client connection pool
When a HTTP client connection is pulled from the pool of keep
alive connections there can be situations where this connection
has just been closed by the server. This is now mittigated by
trying to make a new connection when this happens. It is only
possible to actually create a new connection if no body has been
sent.
4. Forward request headers when redirecting
Both for manual and automatic rediretion any request headers set
on the original request are now set on the redirect request as
well.
5. Invalidate sockets in the client pool if required
Open HTTP socket connections in the client pool are now
invalidated and closed if there is any activify on them while
they are idle.
R=ager@google.com, ajohnsen@google.com
BUG=6984
Committed: https://code.google.com/p/dart/source/detail?r=15782
Patch Set 1 #
Total comments: 15
Messages
Total messages: 5 (0 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||