| 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();
|
|
|