diff options
author | bengr <bengr@chromium.org> | 2015-02-09 17:00:41 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-10 01:01:29 +0000 |
commit | b74404202c6d229207c487f14a92bd73f9674a8b (patch) | |
tree | b7458b24aa251385fa023f604010250753df0a89 /components/data_reduction_proxy | |
parent | c981c46768c00178692bbc95769a6ef27c96126f (diff) | |
download | chromium_src-b74404202c6d229207c487f14a92bd73f9674a8b.zip chromium_src-b74404202c6d229207c487f14a92bd73f9674a8b.tar.gz chromium_src-b74404202c6d229207c487f14a92bd73f9674a8b.tar.bz2 |
Remove deprecated Data Saver via header
With this change, the Data Saver (aka, data reduction proxy)
client logic no longer supports the deprecated Via header:
Via: Chrome Compression Proxy
This header did not conform to HTTP spec.
BUG=435325
Review URL: https://codereview.chromium.org/883473002
Cr-Commit-Position: refs/heads/master@{#315459}
Diffstat (limited to 'components/data_reduction_proxy')
4 files changed, 0 insertions, 113 deletions
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol_unittest.cc index a27cc65..bb187b1 100644 --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol_unittest.cc +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol_unittest.cc @@ -417,19 +417,6 @@ TEST_F(DataReductionProxyProtocolTest, BypassLogic) { -1, BYPASS_EVENT_TYPE_MAX, }, - // Valid data reduction proxy response with older, but still valid via - // header. - { "GET", - "HTTP/1.1 200 OK\r\n" - "Server: proxy\r\n" - "Via: 1.1 Chrome Compression Proxy\r\n\r\n", - false, - false, - 0u, - true, - -1, - BYPASS_EVENT_TYPE_MAX - }, // Valid data reduction proxy response with chained via header, // no bypass message. { "GET", diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_tamper_detection_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_tamper_detection_unittest.cc index f934b45..cc96cd8 100644 --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_tamper_detection_unittest.cc +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_tamper_detection_unittest.cc @@ -311,56 +311,6 @@ TEST_F(DataReductionProxyTamperDetectionTest, Via) { true, false, }, - // Same to above test cases, but with deprecated data reduciton proxy Via - // header. - { - "Checks the case that Chrome Compression Proxy occurs at the last.", - "HTTP/1.1 200 OK\n" - "Via: a, b, c, 1.1 Chrome Compression Proxy\n", - "", - false, - true, - }, - { - "Checks when there is intermediary.", - "HTTP/1.1 200 OK\n" - "Via: a, b, c, 1.1 Chrome Compression Proxy, xyz\n", - "", - true, - true, - }, - { - "Checks the case of empty Via header.", - "HTTP/1.1 200 OK\n" - "Via: \n", - "", - true, - false, - }, - { - "Checks the case that only the data reduction proxy's Via header occurs.", - "HTTP/1.1 200 OK\n" - "Via: 1.1 Chrome Compression Proxy \n", - "", - false, - true, - }, - { - "Checks the case that there are ' ', i.e., empty value after the data" - "reduction proxy's Via header.", - "HTTP/1.1 200 OK\n" - "Via: 1.1 Chrome Compression Proxy , , \n", - "", - false, - true, - }, - { - "Checks the case when there is no Via header", - "HTTP/1.1 200 OK\n", - "", - true, - false, - }, }; for (size_t i = 0; i < arraysize(test); ++i) { diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_headers.cc b/components/data_reduction_proxy/core/common/data_reduction_proxy_headers.cc index 2e820c2..e555cff 100644 --- a/components/data_reduction_proxy/core/common/data_reduction_proxy_headers.cc +++ b/components/data_reduction_proxy/core/common/data_reduction_proxy_headers.cc @@ -190,17 +190,6 @@ bool HasDataReductionProxyViaHeader(const net::HttpResponseHeaders* headers, } } - // TODO(bengr): Remove deprecated header value. - const char kDeprecatedDataReductionProxyViaValue[] = - "1.1 Chrome Compression Proxy"; - iter = NULL; - while (headers->EnumerateHeader(&iter, "via", &value)) - if (value == kDeprecatedDataReductionProxyViaValue) { - if (has_intermediary) - *has_intermediary = !(headers->EnumerateHeader(&iter, "via", &value)); - return true; - } - return false; } diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_headers_unittest.cc b/components/data_reduction_proxy/core/common/data_reduction_proxy_headers_unittest.cc index 70a0c1b..cda2159 100644 --- a/components/data_reduction_proxy/core/common/data_reduction_proxy_headers_unittest.cc +++ b/components/data_reduction_proxy/core/common/data_reduction_proxy_headers_unittest.cc @@ -473,48 +473,9 @@ TEST_F(DataReductionProxyHeadersTest, HasDataReductionProxyViaHeader) { }, { "HTTP/1.1 200 OK\n" "Via: 1.1 Chrome Compression Proxy\n", - true, - true, - false, - }, - { "HTTP/1.1 200 OK\n" - "Via: 1.1 Foo-Bar, 1.1 Chrome Compression Proxy\n", - true, - true, - false, - }, - { "HTTP/1.1 200 OK\n" - "Via: 1.1 Chrome Compression Proxy, 1.1 Bar-Foo\n", - true, - false, - false, - }, - { "HTTP/1.1 200 OK\n" - "Via: 1.1 chrome compression proxy\n", - false, - false, false, - }, - { "HTTP/1.1 200 OK\n" - "Via: 1.1 Foo-Bar\n" - "Via: 1.1 Chrome Compression Proxy\n", - true, - true, false, - }, - { "HTTP/1.1 200 OK\n" - "Via: 1.1 Chrome Compression Proxy\n" - "Via: 1.1 Foo-Bar\n", - true, - false, - false, - }, - { "HTTP/1.1 200 OK\n" - "Via: 1.1 Chrome Compression Proxy\n" - "Via: 1.1 Foo-Bar\n", - true, false, - true, }, }; for (size_t i = 0; i < arraysize(tests); ++i) { |