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

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: Response to comments 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..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()

Powered by Google App Engine
This is Rietveld 408576698