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

Unified Diff: net/http/http_response_headers.cc

Issue 8591037: Implement Drain() on HttpPipelinedStream. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More tests 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
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

Powered by Google App Engine
This is Rietveld 408576698