summaryrefslogtreecommitdiffstats
path: root/net/url_request
diff options
context:
space:
mode:
authorjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-24 21:26:27 +0000
committerjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-24 21:26:27 +0000
commita86c97ccfe0038b1672d5a06d283561b7f294640 (patch)
treec5f380e2d4116f84fbd5c7c0e7053d351f5a3135 /net/url_request
parente941d376f2a51f7beb1432bf1568af6e76eef08a (diff)
downloadchromium_src-a86c97ccfe0038b1672d5a06d283561b7f294640.zip
chromium_src-a86c97ccfe0038b1672d5a06d283561b7f294640.tar.gz
chromium_src-a86c97ccfe0038b1672d5a06d283561b7f294640.tar.bz2
Start to disable bzip2 support. First step: Stop advertising support.
Although it would be nice to just yank it all, it is good to do so slowly so that any cached data that might required bzip2 decoding will still decode and render. Maybe I'm being paranoid... but this seems like a nice first small step. I also disabled the tests that depend on this modified code, and linted the unittest file a bit. BUG=14801 TEST= Be sure you can still view http://ukcp09.defra.gov.uk/content/view/16/6/index.html which is (currently) bzip encoded. r=hunar Review URL: http://codereview.chromium.org/147058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19173 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request')
-rw-r--r--net/url_request/url_request_http_job.cc4
-rw-r--r--net/url_request/url_request_unittest.cc17
2 files changed, 12 insertions, 9 deletions
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index d3b16a6..20c7d88 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -644,11 +644,11 @@ void URLRequestHttpJob::AddExtraHeaders() {
// these headers. Some proxies deliberately corrupt Accept-Encoding headers.
if (!advertise_sdch) {
// Tell the server what compression formats we support (other than SDCH).
- request_info_.extra_headers += "Accept-Encoding: gzip,deflate,bzip2\r\n";
+ request_info_.extra_headers += "Accept-Encoding: gzip,deflate\r\n";
} else {
// Include SDCH in acceptable list.
request_info_.extra_headers += "Accept-Encoding: "
- "gzip,deflate,bzip2,sdch\r\n";
+ "gzip,deflate,sdch\r\n";
if (!avail_dictionaries.empty()) {
request_info_.extra_headers += "Avail-Dictionary: "
+ avail_dictionaries + "\r\n";
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index 22277f4..f5452be 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -831,7 +831,8 @@ TEST_F(URLRequestTest, ResponseHeadersTest) {
EXPECT_EQ("a, b", header);
}
-TEST_F(URLRequestTest, BZip2ContentTest) {
+// TODO(jar): 14801 Remove BZIP code completely.
+TEST_F(URLRequestTest, DISABLED_BZip2ContentTest) {
scoped_refptr<HTTPTestServer> server =
HTTPTestServer::CreateServer(L"net/data/filter_unittests", NULL);
ASSERT_TRUE(NULL != server.get());
@@ -857,7 +858,8 @@ TEST_F(URLRequestTest, BZip2ContentTest) {
EXPECT_EQ(got_content, got_bz2_content);
}
-TEST_F(URLRequestTest, BZip2ContentTest_IncrementalHeader) {
+// TODO(jar): 14801 Remove BZIP code completely.
+TEST_F(URLRequestTest, DISABLED_BZip2ContentTest_IncrementalHeader) {
scoped_refptr<HTTPTestServer> server =
HTTPTestServer::CreateServer(L"net/data/filter_unittests", NULL);
ASSERT_TRUE(NULL != server.get());
@@ -1237,8 +1239,7 @@ TEST_F(URLRequestTest, Post302RedirectGet) {
"Accept-Language: en-US,en\r\n"
"Accept-Charset: ISO-8859-1,*,utf-8\r\n"
"Content-Length: 10\r\n"
- "Origin: http://localhost:1337/"
- );
+ "Origin: http://localhost:1337/");
req.Start();
MessageLoop::current()->Run();
@@ -1275,7 +1276,8 @@ TEST_F(URLRequestTest, Post307RedirectPost) {
// Custom URLRequestJobs for use with interceptor tests
class RestartTestJob : public URLRequestTestJob {
public:
- RestartTestJob(URLRequest* request) : URLRequestTestJob(request, true) {}
+ explicit RestartTestJob(URLRequest* request)
+ : URLRequestTestJob(request, true) {}
protected:
virtual void StartAsync() {
this->NotifyRestartRequired();
@@ -1284,7 +1286,8 @@ class RestartTestJob : public URLRequestTestJob {
class CancelTestJob : public URLRequestTestJob {
public:
- CancelTestJob(URLRequest* request) : URLRequestTestJob(request, true) {}
+ explicit CancelTestJob(URLRequest* request)
+ : URLRequestTestJob(request, true) {}
protected:
virtual void StartAsync() {
request_->Cancel();
@@ -1293,7 +1296,7 @@ class CancelTestJob : public URLRequestTestJob {
class CancelThenRestartTestJob : public URLRequestTestJob {
public:
- CancelThenRestartTestJob(URLRequest* request)
+ explicit CancelThenRestartTestJob(URLRequest* request)
: URLRequestTestJob(request, true) {
}
protected: