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

Unified Diff: net/http/http_stream_parser.cc

Issue 2119623002: Add metrics to track HTTP/0.9 usage for main frames and subresources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: placate clang Created 4 years, 6 months 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_stream_parser.cc
diff --git a/net/http/http_stream_parser.cc b/net/http/http_stream_parser.cc
index 57ef06a34ad38ab6e533d555ddef86212cde8d8e..cb7036a7daeaa1d2aac43f916524a01995e57ab5 100644
--- a/net/http/http_stream_parser.cc
+++ b/net/http/http_stream_parser.cc
@@ -1000,7 +1000,11 @@ int HttpStreamParser::ParseResponseHeaders(int end_offset) {
return ERR_RESPONSE_HEADERS_MULTIPLE_LOCATION;
response_->headers = headers;
- response_->connection_info = HttpResponseInfo::CONNECTION_INFO_HTTP1;
+ if (headers->GetHttpVersion() == HttpVersion(0, 9)) {
+ response_->connection_info = HttpResponseInfo::CONNECTION_INFO_HTTP0_9;
+ } else {
+ response_->connection_info = HttpResponseInfo::CONNECTION_INFO_HTTP1;
+ }
response_->vary_data.Init(*request_, *response_->headers);
DVLOG(1) << __FUNCTION__ << "()"
<< " content_length = \"" << response_->headers->GetContentLength()

Powered by Google App Engine
This is Rietveld 408576698