Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(350)

Unified Diff: net/http/http_stream_parser.cc

Issue 8591037: Implement Drain() on HttpPipelinedStream. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Skip on unusable Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_response_headers.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_parser.cc
diff --git a/net/http/http_stream_parser.cc b/net/http/http_stream_parser.cc
index 707e1ba67196bcd8fc7a05941b40f5f0bed369b8..5ee1f22700179d49d0f52daa00660b2beda9b33e 100644
--- a/net/http/http_stream_parser.cc
+++ b/net/http/http_stream_parser.cc
@@ -721,11 +721,8 @@ void HttpStreamParser::CalculateResponseBodySize() {
response_body_length_ = 0;
if (response_body_length_ == -1) {
- // Ignore spurious chunked responses from HTTP/1.0 servers and
- // proxies. Otherwise "Transfer-Encoding: chunked" trumps
- // "Content-Length: N"
- if (response_->headers->GetHttpVersion() >= HttpVersion(1, 1) &&
- response_->headers->HasHeaderValue("Transfer-Encoding", "chunked")) {
+ // "Transfer-Encoding: chunked" trumps "Content-Length: N"
+ if (response_->headers->IsChunkEncoded()) {
chunked_decoder_.reset(new HttpChunkedDecoder());
} else {
response_body_length_ = response_->headers->GetContentLength();
« no previous file with comments | « net/http/http_response_headers.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698