Index: tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py |
diff --git a/tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py b/tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py |
index f856f5bab6aef08b864a1b7630ecf7b757038566..cda183590441eaa0b2e44251f70e092deb7f83f0 100644 |
--- a/tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py |
+++ b/tools/chrome_proxy/integration_tests/chrome_proxy_metrics.py |
@@ -15,7 +15,6 @@ class ChromeProxyMetricException(page_test.MeasurementFailure): |
CHROME_PROXY_VIA_HEADER = 'Chrome-Compression-Proxy' |
-CHROME_PROXY_VIA_HEADER_DEPRECATED = '1.1 Chrome Compression Proxy' |
class ChromeProxyResponse(network_metrics.HTTPResponse): |
@@ -44,11 +43,10 @@ class ChromeProxyResponse(network_metrics.HTTPResponse): |
if not via_header: |
return False |
vias = [v.strip(' ') for v in via_header.split(',')] |
- # The Via header is valid if it is the old format or the new format |
- # with 4-character version prefix, for example, |
+ # The Via header is valid if it has a 4-character version prefix followed by |
+ # the proxy name, for example, |
# "1.1 Chrome-Compression-Proxy". |
sclittle
2015/02/06 21:05:30
nit: can this fit on the line above?
bengr
2015/02/06 21:57:01
Done.
|
- return (CHROME_PROXY_VIA_HEADER_DEPRECATED in vias or |
- any(v[4:] == CHROME_PROXY_VIA_HEADER for v in vias)) |
+ return any(v[4:] == CHROME_PROXY_VIA_HEADER for v in vias) |
def IsValidByViaHeader(self): |
return (not self.ShouldHaveChromeProxyViaHeader() or |
@@ -323,7 +321,7 @@ class ChromeProxyMetric(network_metrics.NetworkMetric): |
raise ChromeProxyMetricException, ( |
'Response for %s should have come through the fallback proxy.\n' |
'Response: remote_port=%s status=(%d, %s)\nHeaders:\n %s' % ( |
- r.url, str(fallback_resp.remote_port), r.status, r.status_text, |
+ r.url, str(resp.remote_port), r.status, r.status_text, |
r.headers)) |
else: |
via_fallback_count += 1 |