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

Issue 1342443004: [MIGRATED] Make deprecation warnings on XHR's setRequestHeader more accurate (Closed)

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

Description

This CL is migrated to https://codereview.chromium.org/1378543002/ due to repository merge. Make deprecation warnings on XHR's setRequestHeader more accurate The deprecation warnings were shown for the following three kinds of header values: 1. Header values with control octets, 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 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 2. - Creates a separate deprecation counter for 3. - Mentions in the warning message that we are experimenting. - Adds tests. BUG=455099

Patch Set 1 #

Patch Set 2 : Avoid PRESUMIT error. #

Patch Set 3 : Support CRLF on Windows. #

Total comments: 13

Patch Set 4 : Reflect tyoshino's comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+213 lines, -7 lines) Patch
A LayoutTests/http/tests/xmlhttprequest/header-value-update/invalid-octets.html View 1 2 1 chunk +28 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/xmlhttprequest/header-value-update/invalid-octets-expected.txt View 1 chunk +5 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/xmlhttprequest/header-value-update/normalize-affected-1.html View 1 2 1 chunk +32 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/xmlhttprequest/header-value-update/normalize-affected-1-expected.txt View 1 chunk +5 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/xmlhttprequest/header-value-update/normalize-affected-2.html View 1 2 1 chunk +32 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/xmlhttprequest/header-value-update/normalize-affected-2-expected.txt View 1 chunk +5 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/xmlhttprequest/header-value-update/normalize-affected-3.html View 1 2 1 chunk +32 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/xmlhttprequest/header-value-update/normalize-affected-3-expected.txt View 1 chunk +5 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/xmlhttprequest/header-value-update/normalize-unaffected.html View 1 2 1 chunk +34 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/xmlhttprequest/header-value-update/normalize-unaffected-expected.txt View 1 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/frame/UseCounter.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/frame/UseCounter.cpp View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M Source/core/xmlhttprequest/XMLHttpRequest.cpp View 1 2 3 2 chunks +25 lines, -6 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 20 (7 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1342443004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1342443004/1
5 years, 3 months ago (2015-09-15 08:01:13 UTC) #2
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/99777)
5 years, 3 months ago (2015-09-15 08:10:22 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/1342443004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1342443004/20001
5 years, 3 months ago (2015-09-15 08:26:16 UTC) #6
hiroshige
shiva.jm@ and tyoshino@ (core/xmlhttprequest OWNER), could you take a look?
5 years, 3 months ago (2015-09-15 09:00:20 UTC) #8
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/107174)
5 years, 3 months ago (2015-09-15 10:21:41 UTC) #10
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1342443004/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1342443004/40001
5 years, 3 months ago (2015-09-15 10:46:36 UTC) #12
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 3 months ago (2015-09-15 13:45:33 UTC) #14
shiva.jm
On 2015/09/15 09:00:20, hiroshige wrote: > shiva.jm@ and tyoshino@ (core/xmlhttprequest OWNER), could you take a ...
5 years, 3 months ago (2015-09-16 08:29:05 UTC) #15
tyoshino (SeeGerritForStatus)
Sorry for delay https://codereview.chromium.org/1342443004/diff/40001/Source/core/frame/UseCounter.cpp File Source/core/frame/UseCounter.cpp (right): https://codereview.chromium.org/1342443004/diff/40001/Source/core/frame/UseCounter.cpp#newcode958 Source/core/frame/UseCounter.cpp:958: return "Header values not matching to ...
5 years, 2 months ago (2015-09-25 13:01:35 UTC) #16
shiva.jm
dependent CL: https://codereview.chromium.org/1364993003/, is commited now.
5 years, 2 months ago (2015-09-28 11:07:37 UTC) #17
hiroshige
I'll also migrate this CL due to repository merge. https://codereview.chromium.org/1342443004/diff/40001/Source/core/frame/UseCounter.cpp File Source/core/frame/UseCounter.cpp (right): https://codereview.chromium.org/1342443004/diff/40001/Source/core/frame/UseCounter.cpp#newcode958 Source/core/frame/UseCounter.cpp:958: ...
5 years, 2 months ago (2015-09-29 05:19:09 UTC) #18
hiroshige
This CL is migrated to: https://codereview.chromium.org/1378543002/
5 years, 2 months ago (2015-09-29 05:37:35 UTC) #19
tyoshino (SeeGerritForStatus)
5 years, 2 months ago (2015-09-29 08:43:28 UTC) #20
Message was sent while issue was closed.
https://codereview.chromium.org/1342443004/diff/40001/Source/core/xmlhttprequ...
File Source/core/xmlhttprequest/XMLHttpRequest.cpp (right):

https://codereview.chromium.org/1342443004/diff/40001/Source/core/xmlhttprequ...
Source/core/xmlhttprequest/XMLHttpRequest.cpp:1187: if
(FetchUtils::isForbiddenHeaderName(name)) {
On 2015/09/29 05:19:09, hiroshige wrote:
> On 2015/09/25 13:01:35, tyoshino wrote:
> > Let's move this to the right place so that we won't forget to apply this
check
> > on the result of normalization when we do the deprecation.
> 
> This check is on the header name, not the header value, so thus is not related
> to header value update issues.

Ouch. Never mind.

Powered by Google App Engine
This is Rietveld 408576698