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

Issue 8018: Clean up filter and content encoding handling ... (Closed)

Created:
12 years, 2 months ago by jar (doing other things)
Modified:
9 years, 6 months ago
Reviewers:
huanr, kmixter2, Lincoln
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Clean up filter and content encoding handling Centralize translation functions (text of "Content-Encoding" to enum) in filter.cc Centralize error recovery (for damaged content encoding headers) in filter.cc Error recovery includes a loss of SDCH encoding headers, plus handling of Apache server bug with gzip files are tagged as also being gzip encoded. Centralize and add a pile of unit tests to this filter code. r=openvcdiff,huanr Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=4004

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Patch Set 9 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+413 lines, -346 lines) Patch
M base/base_lib.scons View 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M base/field_trial.h View 2 3 4 5 6 7 8 1 chunk +4 lines, -1 line 0 comments Download
M net/base/bzip2_filter_unittest.cc View 1 2 3 4 5 6 7 8 11 chunks +31 lines, -42 lines 0 comments Download
M net/base/filter.h View 1 2 3 4 5 6 7 8 4 chunks +27 lines, -18 lines 0 comments Download
M net/base/filter.cc View 1 2 3 4 5 6 7 8 4 chunks +81 lines, -27 lines 0 comments Download
A net/base/filter_unittest.cc View 1 chunk +133 lines, -0 lines 0 comments Download
M net/base/gzip_filter_unittest.cc View 1 2 3 4 5 6 7 8 12 chunks +29 lines, -62 lines 0 comments Download
M net/base/sdch_filter.cc View 1 2 3 4 5 6 7 8 4 chunks +6 lines, -4 lines 0 comments Download
M net/base/sdch_filter_unittest.cc View 1 2 3 4 5 6 7 8 15 chunks +30 lines, -91 lines 0 comments Download
M net/base/sdch_manager.h View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -3 lines 0 comments Download
M net/base/sdch_manager.cc View 1 2 3 4 5 6 7 8 5 chunks +6 lines, -4 lines 0 comments Download
M net/build/net_unittests.vcproj View 2 3 4 5 6 7 8 2 chunks +7 lines, -3 lines 0 comments Download
M net/net_unittests.scons View 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M net/url_request/url_request_http_job.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M net/url_request/url_request_http_job.cc View 1 2 3 4 5 6 7 8 4 chunks +41 lines, -80 lines 0 comments Download
M net/url_request/url_request_job.h View 1 2 3 4 5 6 7 8 1 chunk +8 lines, -6 lines 0 comments Download
M net/url_request/url_request_job.cc View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -4 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
jar (doing other things)
This is predominantly a mechanical refactoring to facilitate testing, and centralize error recovery (from header ...
12 years, 2 months ago (2008-10-23 18:39:38 UTC) #1
Lincoln
Great changes. Really nice work. Hurrah for new unit tests and for knocking out some ...
12 years, 2 months ago (2008-10-23 23:29:48 UTC) #2
jar (doing other things)
This includes responses and changes for all of Lincoln's comments. Jim http://codereview.chromium.org/8018/diff/263/271 File net/base/filter.cc (right): ...
12 years, 2 months ago (2008-10-24 00:31:53 UTC) #3
Lincoln
LGTM
12 years, 2 months ago (2008-10-24 00:39:25 UTC) #4
huanr
http://codereview.chromium.org/8018/diff/70/312 File net/base/filter.cc (right): http://codereview.chromium.org/8018/diff/70/312#newcode86 Line 86: LowerCaseEqualsASCII(mime_type, kApplicationXGunzip)) this seems a behavior change. previously ...
12 years, 1 month ago (2008-10-24 22:55:42 UTC) #5
kmixter
LGTM
12 years, 1 month ago (2008-10-24 23:27:11 UTC) #6
jar (doing other things)
12 years, 1 month ago (2008-10-26 07:21:44 UTC) #7
Comments below in response to Huanr's comments.

Thanks,

Jim

http://codereview.chromium.org/8018/diff/70/312
File net/base/filter.cc (right):

http://codereview.chromium.org/8018/diff/70/312#newcode86
Line 86: LowerCaseEqualsASCII(mime_type, kApplicationXGunzip))
On 2008/10/24 22:55:42, huanr wrote:
> this seems a behavior change. previously we check mime_type and apply work
> around for every filer type in the chain. but now we only do it for the first
> one?

It is a slight behavior change.... 

The original code only supported at most 1 encoding filter.  Recall that a
stream of filters was not supported.  As a result, the "original" bug fix (found
in FireFox to deal with Apache) only processed a singleton encoding.  

This change restored (minimized?) the Apache patch to only work on the
singleton.  Unless we have evidence of it being needed more broadly, it seemed
best to leave it restricted.

http://codereview.chromium.org/8018/diff/70/317
File net/build/net_unittests.vcproj (right):

http://codereview.chromium.org/8018/diff/70/317#newcode330
Line 330: RelativePath="..\base\filter_unittest.cc"
On 2008/10/24 22:55:42, huanr wrote:
> did you add it in both debug and release settings?

I think there is only one place to add it (and it runs in both settings).  What
am I missing?

Powered by Google App Engine
This is Rietveld 408576698