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

Issue 56043: Use HTTP status return code to make SDCH handling more robust... (Closed)

Created:
11 years, 9 months ago by jar (doing other things)
Modified:
9 years, 7 months ago
Reviewers:
huanr, Lincoln, wtc
CC:
chromium-reviews_googlegroups.com, kmixter
Visibility:
Public.

Description

Use HTTP status return code to make SDCH handling more robust. At least one proxy replaces the SDCH content with an error page (of HTML, without SDCH compression). We can identify that scenario by spotting the 40x HTTP return code (and the fact that the content is not SDCH encoded, even though we advertised SDCH and a dictionary to the server). This change list adds the ability to access the return code via the FilterContext. The bulk of the change is centered on getting that access method to be const in all derived classes. bug=8916 r=wtc,huanr,openvcdiff Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=12784

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Total comments: 23

Patch Set 8 : '' #

Patch Set 9 : '' #

Total comments: 2

Patch Set 10 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+224 lines, -17 lines) Patch
M chrome/common/net/url_request_intercept_job.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/net/url_request_intercept_job.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M net/base/filter.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M net/base/filter_unittest.h View 1 2 3 4 5 6 7 4 chunks +6 lines, -1 line 0 comments Download
M net/base/gzip_filter_unittest.cc View 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M net/base/sdch_filter.cc View 1 2 3 4 5 6 7 8 9 3 chunks +23 lines, -4 lines 0 comments Download
M net/base/sdch_filter_unittest.cc View 3 4 5 6 7 8 3 chunks +180 lines, -4 lines 0 comments Download
M net/url_request/url_request_http_job.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M net/url_request/url_request_http_job.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M net/url_request/url_request_job.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M net/url_request/url_request_new_ftp_job.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M net/url_request/url_request_new_ftp_job.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 8 (0 generated)
jar (doing other things)
Many files... but actually a small issue (mostly one line changes in files). Wtc: Please ...
11 years, 9 months ago (2009-03-28 21:14:48 UTC) #1
Lincoln
I'm assuming you meant GetResponseCode() rather than GetStatusCode() in your review request comments. http://codereview.chromium.org/56043/diff/2001/81 File ...
11 years, 8 months ago (2009-03-30 15:18:07 UTC) #2
wtc
LGTM. I mainly reviewed the portions that move GetResponseCode to the FilterContext interface and make ...
11 years, 8 months ago (2009-03-30 17:28:30 UTC) #3
jar (doing other things)
Comments and changes per lincoln's suggestions and corrections. Nice job Lincoln!! http://codereview.chromium.org/56043/diff/2001/81 File net/base/gzip_filter_unittest.cc (right): ...
11 years, 8 months ago (2009-03-30 17:39:47 UTC) #4
Lincoln
LGTM
11 years, 8 months ago (2009-03-30 17:53:06 UTC) #5
huanr
LGTM http://codereview.chromium.org/56043/diff/2005/106 File net/base/sdch_filter.cc (right): http://codereview.chromium.org/56043/diff/2005/106#newcode249 Line 249: } else { The addition of successful_response ...
11 years, 8 months ago (2009-03-30 17:56:14 UTC) #6
jar (doing other things)
Per discussion with Hunar, added additional comments to the flow in the error recovery portion ...
11 years, 8 months ago (2009-03-30 18:00:09 UTC) #7
jar (doing other things)
11 years, 8 months ago (2009-03-30 19:22:55 UTC) #8
Post landing responses.

http://codereview.chromium.org/56043/diff/2001/73
File net/url_request/url_request_job.h (right):

http://codereview.chromium.org/56043/diff/2001/73#newcode108
Line 108: virtual int GetResponseCode() const { return -1; }
On 2009/03/30 17:28:30, wtc wrote:
> Move this method down to the "FilterContext methods" section
> below.

Done (in separate tiny secondary CL)

http://codereview.chromium.org/56043/diff/2005/106
File net/base/sdch_filter.cc (right):

http://codereview.chromium.org/56043/diff/2005/106#newcode249
Line 249: } else {
On 2009/03/30 17:56:14, huanr wrote:
> The addition of successful_response makes the condition of this else clause
> complicated. It would be helpful to comment that this is the most expensive
> recovery path.

Done.

Powered by Google App Engine
This is Rietveld 408576698