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

Unified Diff: net/http/http_stream_parser.cc

Issue 2140253002: Add metrics to track HTTP/0.9 usage for main frames and subresources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 5 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
« no previous file with comments | « net/http/http_response_info.cc ('k') | net/http/http_stream_parser_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..b673689ed296c510ab1a7d89f764c5424235e5c9 100644
--- a/net/http/http_stream_parser.cc
+++ b/net/http/http_stream_parser.cc
@@ -1000,7 +1000,13 @@ 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 if (headers->GetHttpVersion() == HttpVersion(1, 0)) {
+ response_->connection_info = HttpResponseInfo::CONNECTION_INFO_HTTP1_0;
+ } else if (headers->GetHttpVersion() == HttpVersion(1, 1)) {
+ response_->connection_info = HttpResponseInfo::CONNECTION_INFO_HTTP1_1;
+ }
response_->vary_data.Init(*request_, *response_->headers);
DVLOG(1) << __FUNCTION__ << "()"
<< " content_length = \"" << response_->headers->GetContentLength()
« no previous file with comments | « net/http/http_response_info.cc ('k') | net/http/http_stream_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698