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

Unified Diff: webkit/glue/weburlloader_impl.cc

Issue 10383201: Expose HTTP version number in responses. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 7 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 | « no previous file | webkit/media/buffered_resource_loader.cc » ('j') | webkit/media/buffered_resource_loader.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/weburlloader_impl.cc
diff --git a/webkit/glue/weburlloader_impl.cc b/webkit/glue/weburlloader_impl.cc
index dda17df64518b212fe297696636c9aea4870524f..c6bcab8732da198796f6acf6f7de4c9bee2e20aa 100644
--- a/webkit/glue/weburlloader_impl.cc
+++ b/webkit/glue/weburlloader_impl.cc
@@ -229,6 +229,14 @@ void PopulateURLResponse(
if (!headers)
return;
+ WebURLResponse::HTTPVersion version = WebURLResponse::Unknown;
+ if (headers->GetHttpVersion() == net::HttpVersion(0, 9))
+ version = WebURLResponse::HTTP_0_9;
+ else if (headers->GetHttpVersion() == net::HttpVersion(1, 0))
+ version = WebURLResponse::HTTP_1_0;
+ else if (headers->GetHttpVersion() == net::HttpVersion(1, 1))
darin (slow to review) 2012/05/21 23:39:07 you should probably complain if GetHttpVersion() r
Ami GONE FROM CHROMIUM 2012/05/21 23:49:23 What kind of complaint did you have in mind? (no
+ version = WebURLResponse::HTTP_1_1;
+ response->setHTTPVersion(version);
response->setHTTPStatusCode(headers->response_code());
response->setHTTPStatusText(WebString::fromUTF8(headers->GetStatusText()));
« no previous file with comments | « no previous file | webkit/media/buffered_resource_loader.cc » ('j') | webkit/media/buffered_resource_loader.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698