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

Issue 1378543002: Add UMA for header values in XHR's setRequestHeader() checked against RFC 7230 (Closed)

Created:
5 years, 2 months ago by hiroshige
Modified:
5 years, 2 months ago
CC:
chromium-reviews, blink-reviews, tyoshino+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add UMA for header values in XHR's setRequestHeader() checked against RFC 7230 Previously, deprecation warnings were shown for the following three kinds of header values: Category 1. Header values with control octets that are rejected by RFC 7230, Category 2. Header values with leading/trailing whitespaces, but normalization doesn't have effect (because other parts of Chromium strip such whitespaces before sent to network), and Category 3. Header values with leading/trailing whitespaces and normalization does have effect. For example, in the case of calling setRequestHeader('test', 'a ') and setRequestHeader('test', ' b'), the whitespaces remains in the middle of the header value ('test: a , b') and will be removed by normalization. This CL suppresses deprecation warnings for all of them and adds UMA instead: HeaderValueInvalid: Category 1. HeaderValueAffectedByNormalization: Category 3. HeaderValueValid: Category 2 and header values valid in RFC 7230. BUG=455099 Committed: https://crrev.com/ce71fe405f5df954732e01eb88627e8843a3a587 Cr-Commit-Position: refs/heads/master@{#352247}

Patch Set 1 #

Patch Set 2 : Update test expectations due to message change. #

Total comments: 10

Patch Set 3 : Reflected tyoshino's comments. #

Total comments: 3

Patch Set 4 : Use UMA without deprecation warnings. #

Total comments: 4

Patch Set 5 : Reflected comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -6 lines) Patch
M third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp View 1 2 3 4 4 chunks +32 lines, -6 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 2 chunks +16 lines, -0 lines 0 comments Download

Messages

Total messages: 33 (11 generated)
hiroshige
+kinuko, could you take a look as core/ OWNER?
5 years, 2 months ago (2015-09-29 05:39:24 UTC) #3
hiroshige
On 2015/09/29 05:39:24, hiroshige wrote: > +kinuko, could you take a look as core/ OWNER? ...
5 years, 2 months ago (2015-09-29 05:42:47 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1378543002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1378543002/20001
5 years, 2 months ago (2015-09-29 05:43:51 UTC) #6
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_clang_dbg_recipe on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_clang_dbg_recipe/builds/126743)
5 years, 2 months ago (2015-09-29 06:09:48 UTC) #8
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/1378543002/diff/20001/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/header-value-update/invalid-octets.html File third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/header-value-update/invalid-octets.html (right): https://codereview.chromium.org/1378543002/diff/20001/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/header-value-update/invalid-octets.html#newcode4 third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/header-value-update/invalid-octets.html:4: <script src = "../../resources/testharnessreport.js"></script> Majority of the files in ...
5 years, 2 months ago (2015-09-29 09:02:24 UTC) #9
hiroshige
https://codereview.chromium.org/1378543002/diff/20001/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/header-value-update/invalid-octets.html File third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/header-value-update/invalid-octets.html (right): https://codereview.chromium.org/1378543002/diff/20001/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/header-value-update/invalid-octets.html#newcode4 third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/header-value-update/invalid-octets.html:4: <script src = "../../resources/testharnessreport.js"></script> On 2015/09/29 09:02:24, tyoshino wrote: ...
5 years, 2 months ago (2015-09-29 10:34:10 UTC) #10
kinuko
Some documentation nits, code changes (in core/) lgtm https://codereview.chromium.org/1378543002/diff/40001/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/header-value-update/normalize-affected-1.html File third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/header-value-update/normalize-affected-1.html (right): https://codereview.chromium.org/1378543002/diff/40001/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/header-value-update/normalize-affected-1.html#newcode36 third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/header-value-update/normalize-affected-1.html:36: // ...
5 years, 2 months ago (2015-09-29 12:51:34 UTC) #11
hiroshige
https://codereview.chromium.org/1378543002/diff/40001/third_party/WebKit/Source/core/frame/UseCounter.cpp File third_party/WebKit/Source/core/frame/UseCounter.cpp (right): https://codereview.chromium.org/1378543002/diff/40001/third_party/WebKit/Source/core/frame/UseCounter.cpp#newcode936 third_party/WebKit/Source/core/frame/UseCounter.cpp:936: return "According to the Fetch Standard, setRequestHeader() must strip ...
5 years, 2 months ago (2015-09-29 13:21:38 UTC) #12
kinuko (google)
On 2015/09/29 13:21:38, hiroshige wrote: > https://codereview.chromium.org/1378543002/diff/40001/third_party/WebKit/Source/core/frame/UseCounter.cpp > File third_party/WebKit/Source/core/frame/UseCounter.cpp (right): > > https://codereview.chromium.org/1378543002/diff/40001/third_party/WebKit/Source/core/frame/UseCounter.cpp#newcode936 > ...
5 years, 2 months ago (2015-09-29 13:29:13 UTC) #13
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1378543002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1378543002/60001
5 years, 2 months ago (2015-09-30 08:55:21 UTC) #15
hiroshige
Patch Set 4: Created UMA-only CL (no warnings for developers). PTAL.
5 years, 2 months ago (2015-09-30 09:19:59 UTC) #16
kinuko
lgtm
5 years, 2 months ago (2015-09-30 11:10:05 UTC) #17
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 2 months ago (2015-09-30 13:00:39 UTC) #19
hiroshige
+asvitkine for tools/metrics/ OWNER. Could you take a look? Also updated CL description.
5 years, 2 months ago (2015-09-30 15:27:07 UTC) #21
Alexei Svitkine (slow)
https://codereview.chromium.org/1378543002/diff/60001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/1378543002/diff/60001/tools/metrics/histograms/histograms.xml#newcode49647 tools/metrics/histograms/histograms.xml:49647: +<histogram name="WebCore.XHR.setRequestHeader.HeaderValueCategoryInRFC7230" Would it make more sense for this ...
5 years, 2 months ago (2015-09-30 19:44:45 UTC) #22
hiroshige
https://codereview.chromium.org/1378543002/diff/60001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/1378543002/diff/60001/tools/metrics/histograms/histograms.xml#newcode49647 tools/metrics/histograms/histograms.xml:49647: +<histogram name="WebCore.XHR.setRequestHeader.HeaderValueCategoryInRFC7230" On 2015/09/30 19:44:45, Alexei Svitkine wrote: > ...
5 years, 2 months ago (2015-10-01 03:11:52 UTC) #23
Alexei Svitkine (slow)
lgtm
5 years, 2 months ago (2015-10-01 16:28:36 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1378543002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1378543002/80001
5 years, 2 months ago (2015-10-02 12:30:47 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_android_rel_ng/builds/77043)
5 years, 2 months ago (2015-10-02 17:34:50 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1378543002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1378543002/80001
5 years, 2 months ago (2015-10-03 04:03:08 UTC) #31
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 2 months ago (2015-10-03 06:21:17 UTC) #32
commit-bot: I haz the power
5 years, 2 months ago (2015-10-03 06:22:38 UTC) #33
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/ce71fe405f5df954732e01eb88627e8843a3a587
Cr-Commit-Position: refs/heads/master@{#352247}

Powered by Google App Engine
This is Rietveld 408576698