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

Issue 2753453003: Reject unadvertised encodings (Closed)

Created:
3 years, 9 months ago by eustas
Modified:
3 years, 8 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, bnc+watch_chromium.org, net-reviews_chromium.org, xunjieli
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Reject unadvertised encodings in HttpNetworkTransaction. Only recognized encodings are affected. Currently these are: * br * deflate * gzip / x-gzip * sdch FilterSourceStream::ParseEncodingType is used to check if encoding is "recognized". "Unrecognized" encodings go through HttpNetworkTransaction check and URLRequestHttpJob is responsible for them. When non-advertised recognised encoding is detected, it is recorded in UMA as "REJECTED", and transaction is finished with CONTENT_DECODING_FAILED error code. BUG=579606 Review-Url: https://codereview.chromium.org/2753453003 Cr-Commit-Position: refs/heads/master@{#462414} Committed: https://chromium.googlesource.com/chromium/src/+/c7d27da6abdf2bb847539a83e485e7d0389ccce0

Patch Set 1 #

Patch Set 2 : Reject unadvertised encodings. #

Total comments: 16

Patch Set 3 : Reject unadvertised encodings. #

Total comments: 13

Patch Set 4 : Rewrite parser and move it to HttpUtil #

Patch Set 5 : Split parsing and matching #

Patch Set 6 : Extracted code for UMA reporting #

Total comments: 10

Patch Set 7 : Address comments #

Patch Set 8 : Reject unadvertised encodings. #

Patch Set 9 : Reject unadvertised encodings. #

Patch Set 10 : Reject unadvertised encodings. #

Total comments: 7

Patch Set 11 : Address comments #

Total comments: 1

Patch Set 12 : Fix nit. #

Total comments: 2

Patch Set 13 : Fix histo value comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+382 lines, -24 lines) Patch
M net/filter/filter_source_stream.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -0 lines 0 comments Download
M net/filter/filter_source_stream.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +29 lines, -2 lines 0 comments Download
M net/filter/source_stream_type_list.h View 1 2 3 4 5 6 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M net/http/http_network_transaction.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -0 lines 0 comments Download
M net/http/http_network_transaction.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +51 lines, -0 lines 0 comments Download
M net/http/http_network_transaction_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +56 lines, -0 lines 0 comments Download
M net/http/http_util.h View 1 2 3 4 5 6 2 chunks +16 lines, -0 lines 0 comments Download
M net/http/http_util.cc View 1 2 3 4 5 6 1 chunk +104 lines, -0 lines 0 comments Download
M net/http/http_util_unittest.cc View 1 2 3 4 5 6 1 chunk +80 lines, -0 lines 0 comments Download
M net/url_request/url_request_http_job.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +24 lines, -19 lines 0 comments Download
M net/url_request/url_request_http_job_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -3 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 45 (21 generated)
eustas
3 years, 9 months ago (2017-03-14 19:23:38 UTC) #2
Randy Smith (Not in Mondays)
Quick first pass--didn't review the tests since I'm on bug triage today and trying to ...
3 years, 9 months ago (2017-03-15 16:35:32 UTC) #4
mmenke
On 2017/03/15 16:35:32, Randy Smith (Not in Mondays) wrote: > Quick first pass--didn't review the ...
3 years, 9 months ago (2017-03-15 16:55:52 UTC) #5
mmenke
On 2017/03/15 16:55:52, mmenke wrote: > On 2017/03/15 16:35:32, Randy Smith (Not in Mondays) wrote: ...
3 years, 9 months ago (2017-03-15 17:14:44 UTC) #6
eustas
https://codereview.chromium.org/2753453003/diff/20001/net/base/net_error_list.h File net/base/net_error_list.h (right): https://codereview.chromium.org/2753453003/diff/20001/net/base/net_error_list.h#newcode706 net/base/net_error_list.h:706: NET_ERROR(INVALID_CONTENT_ENCODING, -373) On 2017/03/15 16:35:31, Randy Smith (Not in ...
3 years, 9 months ago (2017-03-16 12:08:17 UTC) #7
Randy Smith (Not in Mondays)
On 2017/03/15 17:14:44, mmenke wrote: > On 2017/03/15 16:55:52, mmenke wrote: > > On 2017/03/15 ...
3 years, 9 months ago (2017-03-16 16:50:48 UTC) #8
mmenke
On 2017/03/16 16:50:48, Randy Smith (Not in Mondays) wrote: > On 2017/03/15 17:14:44, mmenke wrote: ...
3 years, 9 months ago (2017-03-16 17:05:54 UTC) #9
Randy Smith (Not in Mondays)
https://codereview.chromium.org/2753453003/diff/20001/net/base/net_error_list.h File net/base/net_error_list.h (right): https://codereview.chromium.org/2753453003/diff/20001/net/base/net_error_list.h#newcode706 net/base/net_error_list.h:706: NET_ERROR(INVALID_CONTENT_ENCODING, -373) On 2017/03/16 12:08:16, eustas wrote: > On ...
3 years, 9 months ago (2017-03-16 17:50:44 UTC) #10
Randy Smith (Not in Mondays)
Eugene: As per the discussion on http://crbug.com/579606, could you add a function in net/filter that ...
3 years, 9 months ago (2017-03-17 18:40:33 UTC) #11
eustas
On 2017/03/17 18:40:33, Randy Smith (Not in Mondays) wrote: > Eugene: As per the discussion ...
3 years, 9 months ago (2017-03-17 19:03:54 UTC) #12
eustas
3 years, 9 months ago (2017-03-17 19:04:04 UTC) #13
Randy Smith (Not in Mondays)
On 2017/03/17 19:03:54, eustas wrote: > On 2017/03/17 18:40:33, Randy Smith (Not in Mondays) wrote: ...
3 years, 9 months ago (2017-03-17 19:16:03 UTC) #14
eustas
PTAL https://codereview.chromium.org/2753453003/diff/20001/net/base/net_error_list.h File net/base/net_error_list.h (right): https://codereview.chromium.org/2753453003/diff/20001/net/base/net_error_list.h#newcode706 net/base/net_error_list.h:706: NET_ERROR(INVALID_CONTENT_ENCODING, -373) On 2017/03/16 17:50:43, Randy Smith (Not ...
3 years, 9 months ago (2017-03-20 13:05:18 UTC) #16
Randy Smith (Not in Mondays)
So there's one key thing missing here, which is that because of the whole compatibility ...
3 years, 9 months ago (2017-03-21 21:23:20 UTC) #17
eustas
https://codereview.chromium.org/2753453003/diff/100001/net/http/http_network_transaction.cc File net/http/http_network_transaction.cc (right): https://codereview.chromium.org/2753453003/diff/100001/net/http/http_network_transaction.cc#newcode1735 net/http/http_network_transaction.cc:1735: if (!HttpUtil::ParseAcceptEncoding(accept_encoding, &allowed_encodings)) On 2017/03/21 21:23:20, Randy Smith (Not ...
3 years, 9 months ago (2017-03-27 10:27:11 UTC) #18
eustas
Moved known endoding recognition to filters. PTAL
3 years, 9 months ago (2017-03-27 10:30:54 UTC) #19
Randy Smith (Not in Mondays)
Could you expand the CL description a bit to say where the check is being ...
3 years, 8 months ago (2017-03-28 19:55:36 UTC) #28
eustas
PTAL https://codereview.chromium.org/2753453003/diff/180001/net/http/http_network_transaction.cc File net/http/http_network_transaction.cc (right): https://codereview.chromium.org/2753453003/diff/180001/net/http/http_network_transaction.cc#newcode1749 net/http/http_network_transaction.cc:1749: // successfully decoded. On 2017/03/28 19:55:36, Randy Smith ...
3 years, 8 months ago (2017-04-04 10:34:30 UTC) #30
Randy Smith (Not in Mondays)
LGTM with nit. Thanks very much!! https://codereview.chromium.org/2753453003/diff/200001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/2753453003/diff/200001/tools/metrics/histograms/histograms.xml#newcode103722 tools/metrics/histograms/histograms.xml:103722: + "Content-Encoding". nit: ...
3 years, 8 months ago (2017-04-05 00:03:33 UTC) #31
eustas
Steven, take a look at histograms.xml, please.
3 years, 8 months ago (2017-04-05 09:22:21 UTC) #35
Steven Holte
LGTM with some minor corrections. https://codereview.chromium.org/2753453003/diff/220001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/2753453003/diff/220001/tools/metrics/histograms/histograms.xml#newcode103806 tools/metrics/histograms/histograms.xml:103806: + appears in "Content-Encoding" ...
3 years, 8 months ago (2017-04-05 17:45:42 UTC) #38
eustas
https://codereview.chromium.org/2753453003/diff/220001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/2753453003/diff/220001/tools/metrics/histograms/histograms.xml#newcode103806 tools/metrics/histograms/histograms.xml:103806: + appears in "Content-Encoding" header. Despite of being reported ...
3 years, 8 months ago (2017-04-06 08:06:09 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2753453003/240001
3 years, 8 months ago (2017-04-06 08:06:31 UTC) #42
commit-bot: I haz the power
3 years, 8 months ago (2017-04-06 10:34:16 UTC) #45
Message was sent while issue was closed.
Committed patchset #13 (id:240001) as
https://chromium.googlesource.com/chromium/src/+/c7d27da6abdf2bb847539a83e485...

Powered by Google App Engine
This is Rietveld 408576698