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

Unified Diff: net/http/http_response_headers.cc

Issue 187273002: Fixed chrome proxy via check (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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 | net/http/http_response_headers_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_response_headers.cc
diff --git a/net/http/http_response_headers.cc b/net/http/http_response_headers.cc
index 0072976ada2e16891a487683d7c2ed1dd214be71..1c83d7f17b97b8c57ea96da76f492962e618b3ad 100644
--- a/net/http/http_response_headers.cc
+++ b/net/http/http_response_headers.cc
@@ -1431,7 +1431,8 @@ bool HttpResponseHeaders::IsChromeProxyResponse() const {
// space following it are always |kVersionSize| characters. E.g.,
// 'Via: 1.1 Chrome-Compression-Proxy'
while (EnumerateHeader(&iter, "via", &value)) {
- if (!value.compare(kVersionSize, value_len, kChromeProxyViaValue))
+ if (value.size() >= kVersionSize + value_len &&
+ !value.compare(kVersionSize, value_len, kChromeProxyViaValue))
return true;
}
« no previous file with comments | « no previous file | net/http/http_response_headers_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698