diff options
author | simonjam@chromium.org <simonjam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-30 21:19:58 +0000 |
---|---|---|
committer | simonjam@chromium.org <simonjam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-30 21:19:58 +0000 |
commit | e2bec3977f5b6c9efb518ff41fa9f1bd811706f2 (patch) | |
tree | 26e00a8a9980fa43dccdddd44fe251001c443bdd /net/http/http_stream_parser.cc | |
parent | 1739e57d298ae11f29588ea50c7a30fd4bf5f03c (diff) | |
download | chromium_src-e2bec3977f5b6c9efb518ff41fa9f1bd811706f2.zip chromium_src-e2bec3977f5b6c9efb518ff41fa9f1bd811706f2.tar.gz chromium_src-e2bec3977f5b6c9efb518ff41fa9f1bd811706f2.tar.bz2 |
Implement Drain() on HttpPipelinedStream.
BUG=102385
TEST=net_unittests
Review URL: http://codereview.chromium.org/8591037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112289 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_stream_parser.cc')
-rw-r--r-- | net/http/http_stream_parser.cc | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/net/http/http_stream_parser.cc b/net/http/http_stream_parser.cc index 707e1ba..5ee1f22 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(); |