Index: net/http/http_response_headers.cc |
diff --git a/net/http/http_response_headers.cc b/net/http/http_response_headers.cc |
index 88b3f02a35e0ff1832e073547c7ee145c68a7ea8..691536b3bbd11e104d5129db7d91985e497c8be2 100644 |
--- a/net/http/http_response_headers.cc |
+++ b/net/http/http_response_headers.cc |
@@ -1291,4 +1291,10 @@ bool HttpResponseHeaders::GetContentRange(int64* first_byte_position, |
return true; |
} |
+bool HttpResponseHeaders::IsChunkEncoded() const { |
+ // Ignore spurious chunked responses from HTTP/1.0 servers and proxies. |
+ return GetHttpVersion() >= HttpVersion(1, 1) && |
+ HasHeaderValue("Transfer-Encoding", "chunked"); |
+} |
+ |
} // namespace net |