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

Issue 1018903002: Show deprecation warnings for header values in XHR according to RFC 7230 (Closed)

Created:
5 years, 9 months ago by shiva.jm
Modified:
4 years, 11 months ago
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Show deprecation warnings for header values in XHR according to RFC 7230. In this CL: - We don't show messages for Fetch API. - We don't actually update header checks. Also, this CL is preparation for actually updating header value checks to RFC 7230. These issue is a merge from: https://bugs.webkit.org/show_bug.cgi?id=128593. BUG=455099 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=201795

Patch Set 1 #

Total comments: 5

Patch Set 2 : #

Total comments: 4

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Patch Set 9 : #

Patch Set 10 : #

Patch Set 11 : #

Patch Set 12 : #

Patch Set 13 : #

Total comments: 28

Patch Set 14 : #

Patch Set 15 : #

Patch Set 16 : #

Patch Set 17 : #

Patch Set 18 : #

Patch Set 19 : #

Patch Set 20 : #

Total comments: 8

Patch Set 21 : #

Patch Set 22 : #

Total comments: 4

Patch Set 23 : #

Total comments: 6

Patch Set 24 : #

Total comments: 1

Patch Set 25 : #

Patch Set 26 : #

Patch Set 27 : #

Total comments: 6

Patch Set 28 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+60 lines, -1 line) Patch
M Source/core/frame/UseCounter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/frame/UseCounter.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +3 lines, -0 lines 0 comments Download
M Source/core/xmlhttprequest/XMLHttpRequest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +4 lines, -0 lines 0 comments Download
M Source/platform/network/HTTPParsers.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M Source/platform/network/HTTPParsers.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +27 lines, -1 line 0 comments Download
M Source/platform/network/HTTPParsersTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +24 lines, -0 lines 0 comments Download

Messages

Total messages: 97 (26 generated)
shiva.jm
Please have a look.
5 years, 9 months ago (2015-03-18 08:45:24 UTC) #2
tkent
Is the new behavior compatible with IE and Firefox?
5 years, 9 months ago (2015-03-18 08:53:46 UTC) #3
shiva.jm
On 2015/03/18 08:53:46, tkent wrote: > Is the new behavior compatible with IE and Firefox? ...
5 years, 9 months ago (2015-03-19 11:09:55 UTC) #4
tkent
Add XHR people.
5 years, 9 months ago (2015-03-19 22:59:48 UTC) #6
tkent
https://codereview.chromium.org/1018903002/diff/1/Source/platform/network/HTTPParsers.cpp File Source/platform/network/HTTPParsers.cpp (right): https://codereview.chromium.org/1018903002/diff/1/Source/platform/network/HTTPParsers.cpp#newcode113 Source/platform/network/HTTPParsers.cpp:113: UChar c = value[0]; Looks this has an out-of-bound ...
5 years, 9 months ago (2015-03-19 23:04:09 UTC) #7
yhirano
+hiroshige
5 years, 9 months ago (2015-03-20 01:15:15 UTC) #9
yhirano
On 2015/03/20 01:15:15, yhirano wrote: > +hiroshige https://groups.google.com/a/chromium.org/forum/#!msg/net-dev/PBQ6Y_ai0jg/P1EDLokxwtoJ https://docs.google.com/document/d/1eH4aQNaYT6PDFugUXfAcgK4J1aU7m-iu9x_YVGsNel4/edit#
5 years, 9 months ago (2015-03-20 01:21:04 UTC) #10
hiroshige
On 2015/03/20 01:21:04, yhirano wrote: > On 2015/03/20 01:15:15, yhirano wrote: > > +hiroshige > ...
5 years, 9 months ago (2015-03-20 05:24:38 UTC) #11
hiroshige
(Sorry for sending a premature message.) Chromium-side code also contains header value checking, e.g. HttpUtil::IsValidHeaderValue(). ...
5 years, 9 months ago (2015-03-20 05:37:43 UTC) #12
shiva.jm
Please have a look, update the patch to fix review comments https://codereview.chromium.org/1018903002/diff/1/Source/platform/network/HTTPParsers.cpp File Source/platform/network/HTTPParsers.cpp (right): ...
5 years, 9 months ago (2015-03-20 06:23:52 UTC) #13
shiva.jm
On 2015/03/20 05:37:43, hiroshige wrote: > (Sorry for sending a premature message.) > > Chromium-side ...
5 years, 9 months ago (2015-03-20 06:27:17 UTC) #14
hiroshige
> We need to updated HttpUtil::IsValidHeaderValue() also, shall we do it in > another patch, ...
5 years, 9 months ago (2015-03-20 08:53:33 UTC) #15
hiroshige
https://codereview.chromium.org/1018903002/diff/20001/LayoutTests/http/tests/xmlhttprequest/set-bad-headervalue.html File LayoutTests/http/tests/xmlhttprequest/set-bad-headervalue.html (right): https://codereview.chromium.org/1018903002/diff/20001/LayoutTests/http/tests/xmlhttprequest/set-bad-headervalue.html#newcode26 LayoutTests/http/tests/xmlhttprequest/set-bad-headervalue.html:26: try_value("�ス�", true); This test fails on trybots (i.e. no ...
5 years, 9 months ago (2015-03-20 08:54:52 UTC) #16
shiva.jm
On 2015/03/20 08:53:33, hiroshige wrote: > > We need to updated HttpUtil::IsValidHeaderValue() also, shall we ...
5 years, 9 months ago (2015-03-23 05:20:42 UTC) #17
shiva.jm
https://codereview.chromium.org/1018903002/diff/20001/LayoutTests/http/tests/xmlhttprequest/set-bad-headervalue.html File LayoutTests/http/tests/xmlhttprequest/set-bad-headervalue.html (right): https://codereview.chromium.org/1018903002/diff/20001/LayoutTests/http/tests/xmlhttprequest/set-bad-headervalue.html#newcode26 LayoutTests/http/tests/xmlhttprequest/set-bad-headervalue.html:26: try_value("�ス�", true); On 2015/03/20 08:54:52, hiroshige wrote: > This ...
5 years, 9 months ago (2015-03-23 05:21:24 UTC) #18
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/1018903002/diff/20001/LayoutTests/http/tests/xmlhttprequest/set-bad-headervalue.html File LayoutTests/http/tests/xmlhttprequest/set-bad-headervalue.html (right): https://codereview.chromium.org/1018903002/diff/20001/LayoutTests/http/tests/xmlhttprequest/set-bad-headervalue.html#newcode18 LayoutTests/http/tests/xmlhttprequest/set-bad-headervalue.html:18: assert_throws("SyntaxError", function() { client.setRequestHeader("x-test", value) }, ' given value ...
5 years, 9 months ago (2015-03-24 11:43:12 UTC) #19
hiroshige
> so we should first get the use cases or > violations happened and then ...
5 years, 9 months ago (2015-03-26 09:57:17 UTC) #20
shiva.jm
On 2015/03/26 09:57:17, hiroshige wrote: > > so we should first get the use cases ...
5 years, 9 months ago (2015-03-27 09:01:30 UTC) #21
shiva.jm
Please have a look, updated the header value checks for only Fetch API to RFC ...
5 years, 8 months ago (2015-04-14 04:55:42 UTC) #23
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1018903002/60001
5 years, 8 months ago (2015-04-14 05:04:58 UTC) #25
commit-bot: I haz the power
No LGTM from a valid reviewer yet. Only full committers are accepted. Even if an ...
5 years, 8 months ago (2015-04-14 05:05:03 UTC) #27
yhirano
By the way, the fetch spec still uses RFC2616. Hiroshige, we once talked about confirming ...
5 years, 8 months ago (2015-04-17 03:50:04 UTC) #28
hiroshige
Sorry for my late response. Anne (Fetch API spec writer) wrote in [1]: > Hmm, ...
5 years, 8 months ago (2015-04-22 16:47:11 UTC) #29
shiva.jm
On 2015/04/22 16:47:11, hiroshige wrote: > Sorry for my late response. > > Anne (Fetch ...
5 years, 4 months ago (2015-08-13 05:58:03 UTC) #30
hiroshige
On 2015/08/13 05:58:03, shiva.jm wrote: > On 2015/04/22 16:47:11, hiroshige wrote: > > Sorry for ...
5 years, 4 months ago (2015-08-17 18:10:52 UTC) #31
shiva.jm
On 2015/08/17 18:10:52, hiroshige (ooo zombie) wrote: > On 2015/08/13 05:58:03, shiva.jm wrote: > > ...
5 years, 4 months ago (2015-08-19 10:33:52 UTC) #32
hiroshige
> So in your Step 2, if the count is sufficiently small, means we should ...
5 years, 4 months ago (2015-08-19 12:43:02 UTC) #33
shiva.jm
added deprecation warnings and counter, pls have a look. Should we add CONSOLE Warning in ...
5 years, 4 months ago (2015-08-20 16:56:41 UTC) #35
shiva.jm
On 2015/08/20 16:56:41, shiva.jm wrote: > added deprecation warnings and counter, pls have a look. ...
5 years, 4 months ago (2015-08-21 05:51:56 UTC) #36
shiva.jm
pls have a look, will updated the failing tests in patch7 soon.
5 years, 4 months ago (2015-08-21 11:54:28 UTC) #37
shiva.jm
updated with tests, pls have a look.
5 years, 4 months ago (2015-08-24 03:04:13 UTC) #38
hiroshige
Sorry for delay, I'm currently sick and unavailable for a few more days. I'll respond ...
5 years, 4 months ago (2015-08-24 06:07:48 UTC) #39
shiva.jm
updated the tests, but test 'http/tests/inspector/network/network-disable-cache-cors.html' behaves strange in mac, windows and linux builds, even ...
5 years, 3 months ago (2015-08-26 10:53:59 UTC) #41
hiroshige
1. As mentioned in individual comments, I think we want to show warnings if (!isValidHTTPHeaderValueForFetch(value) ...
5 years, 3 months ago (2015-08-27 11:38:08 UTC) #42
shiva.jm
Updated tests and code, pls have a look. but could not call UseCounter::countDeprecation from FetchHeaderList::isValidHeaderValue(), ...
5 years, 3 months ago (2015-09-01 08:26:52 UTC) #43
hiroshige
> but could not call UseCounter::countDeprecation from > FetchHeaderList::isValidHeaderValue(), since from Headers class only Exception ...
5 years, 3 months ago (2015-09-01 11:14:55 UTC) #45
hiroshige
https://codereview.chromium.org/1018903002/diff/400001/Source/core/xmlhttprequest/XMLHttpRequest.cpp File Source/core/xmlhttprequest/XMLHttpRequest.cpp (right): https://codereview.chromium.org/1018903002/diff/400001/Source/core/xmlhttprequest/XMLHttpRequest.cpp#newcode1186 Source/core/xmlhttprequest/XMLHttpRequest.cpp:1186: // Show deprecation warnings and count occurrences of such ...
5 years, 3 months ago (2015-09-01 11:21:18 UTC) #46
shiva.jm
updated tests and code, pls have a look. https://codereview.chromium.org/1018903002/diff/400001/Source/core/xmlhttprequest/XMLHttpRequest.cpp File Source/core/xmlhttprequest/XMLHttpRequest.cpp (right): https://codereview.chromium.org/1018903002/diff/400001/Source/core/xmlhttprequest/XMLHttpRequest.cpp#newcode1186 Source/core/xmlhttprequest/XMLHttpRequest.cpp:1186: // ...
5 years, 3 months ago (2015-09-01 14:29:11 UTC) #48
hiroshige
(non-owner) lgtm with comments/nits. CL Description: > Show deprecation warnings and Update header values check ...
5 years, 3 months ago (2015-09-01 15:07:42 UTC) #49
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1018903002/430001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1018903002/430001
5 years, 3 months ago (2015-09-01 15:18:51 UTC) #51
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/106478)
5 years, 3 months ago (2015-09-01 16:30:10 UTC) #53
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1018903002/450001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1018903002/450001
5 years, 3 months ago (2015-09-02 03:47:55 UTC) #55
shiva.jm
updated patch tests and description, pls have a look. https://codereview.chromium.org/1018903002/diff/430001/Source/platform/network/HTTPParsers.cpp File Source/platform/network/HTTPParsers.cpp (right): https://codereview.chromium.org/1018903002/diff/430001/Source/platform/network/HTTPParsers.cpp#newcode118 Source/platform/network/HTTPParsers.cpp:118: ...
5 years, 3 months ago (2015-09-02 03:49:41 UTC) #57
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 3 months ago (2015-09-02 04:55:02 UTC) #59
hiroshige
+mkwst@, could you take a look?
5 years, 3 months ago (2015-09-02 05:46:27 UTC) #61
Mike West
On 2015/09/02 at 05:46:27, hiroshige wrote: > +mkwst@, could you take a look? A few ...
5 years, 3 months ago (2015-09-02 06:14:02 UTC) #62
Mike West
*ahem* A few comments inline. :) https://codereview.chromium.org/1018903002/diff/450001/Source/platform/network/HTTPParsers.cpp File Source/platform/network/HTTPParsers.cpp (right): https://codereview.chromium.org/1018903002/diff/450001/Source/platform/network/HTTPParsers.cpp#newcode132 Source/platform/network/HTTPParsers.cpp:132: return false; Why ...
5 years, 3 months ago (2015-09-02 06:59:14 UTC) #63
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1018903002/470001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1018903002/470001
5 years, 3 months ago (2015-09-02 09:36:57 UTC) #65
shiva.jm
updated with tests, pls have a look. https://codereview.chromium.org/1018903002/diff/450001/Source/platform/network/HTTPParsers.cpp File Source/platform/network/HTTPParsers.cpp (right): https://codereview.chromium.org/1018903002/diff/450001/Source/platform/network/HTTPParsers.cpp#newcode132 Source/platform/network/HTTPParsers.cpp:132: return false; ...
5 years, 3 months ago (2015-09-02 09:37:12 UTC) #66
hiroshige
https://codereview.chromium.org/1018903002/diff/470001/Source/platform/network/HTTPParsersTest.cpp File Source/platform/network/HTTPParsersTest.cpp (right): https://codereview.chromium.org/1018903002/diff/470001/Source/platform/network/HTTPParsersTest.cpp#newcode253 Source/platform/network/HTTPParsersTest.cpp:253: EXPECT_FALSE(blink::isValidHTTPFieldContentRFC7230("t\vt")); Could you add - a test for null ...
5 years, 3 months ago (2015-09-02 09:53:48 UTC) #67
Mike West
On 2015/09/02 at 09:37:12, shiva.jm wrote: > striping of leading and trailing whitespace will be ...
5 years, 3 months ago (2015-09-02 10:01:10 UTC) #68
Mike West
Otherwise LGTM once hiroshige@ is happy with the tests.
5 years, 3 months ago (2015-09-02 10:02:01 UTC) #69
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 3 months ago (2015-09-02 10:52:54 UTC) #71
shiva.jm
updated patch with new tests.
5 years, 3 months ago (2015-09-03 06:28:05 UTC) #72
shiva.jm
pls have a look.
5 years, 3 months ago (2015-09-03 06:28:30 UTC) #73
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1018903002/490001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1018903002/490001
5 years, 3 months ago (2015-09-03 06:28:43 UTC) #75
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/102662)
5 years, 3 months ago (2015-09-03 07:09:32 UTC) #77
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1018903002/530001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1018903002/530001
5 years, 3 months ago (2015-09-03 10:55:55 UTC) #79
shiva.jm
updated patch with test, but for inputs like:'\u007F', '\u2603' and '\u0218', had build issue like: ...
5 years, 3 months ago (2015-09-03 10:58:28 UTC) #80
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 3 months ago (2015-09-03 12:00:34 UTC) #82
hiroshige
https://codereview.chromium.org/1018903002/diff/530001/Source/platform/network/HTTPParsers.cpp File Source/platform/network/HTTPParsers.cpp (right): https://codereview.chromium.org/1018903002/diff/530001/Source/platform/network/HTTPParsers.cpp#newcode126 Source/platform/network/HTTPParsers.cpp:126: if (!value.containsOnlyLatin1()) I think this block is not needed ...
5 years, 3 months ago (2015-09-04 05:23:42 UTC) #83
shiva.jm
updated test and code, pls have a look. https://codereview.chromium.org/1018903002/diff/530001/Source/platform/network/HTTPParsers.cpp File Source/platform/network/HTTPParsers.cpp (right): https://codereview.chromium.org/1018903002/diff/530001/Source/platform/network/HTTPParsers.cpp#newcode126 Source/platform/network/HTTPParsers.cpp:126: if ...
5 years, 3 months ago (2015-09-04 11:03:09 UTC) #84
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1018903002/550001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1018903002/550001
5 years, 3 months ago (2015-09-04 11:03:50 UTC) #86
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 3 months ago (2015-09-04 12:21:15 UTC) #88
hiroshige
On 2015/09/04 12:21:15, commit-bot: I haz the power wrote: > Dry run: This issue passed ...
5 years, 3 months ago (2015-09-04 13:16:42 UTC) #89
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1018903002/550001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1018903002/550001
5 years, 3 months ago (2015-09-04 13:18:28 UTC) #92
commit-bot: I haz the power
Committed patchset #28 (id:550001) as https://src.chromium.org/viewvc/blink?view=rev&revision=201795
5 years, 3 months ago (2015-09-04 13:23:10 UTC) #93
yuvaa.it
Hi Shiva, Is it implemented already? In safari if i am sending a param and ...
4 years, 11 months ago (2016-01-25 17:32:49 UTC) #94
shiva.jm
On 2016/01/25 17:32:49, yuvaa.it_gmail.com wrote: > Hi Shiva, > Is it implemented already? > In ...
4 years, 11 months ago (2016-01-27 06:10:23 UTC) #95
hiroshige
On 2016/01/27 06:10:23, shiva.jm wrote: > On 2016/01/25 17:32:49, http://yuvaa.it_gmail.com wrote: > > Hi Shiva, ...
4 years, 11 months ago (2016-01-27 06:56:56 UTC) #96
yuvaa.it
4 years, 11 months ago (2016-01-27 08:55:26 UTC) #97
Message was sent while issue was closed.
On 2016/01/27 06:56:56, hiroshige wrote:
> On 2016/01/27 06:10:23, shiva.jm wrote:
> > On 2016/01/25 17:32:49, http://yuvaa.it_gmail.com wrote:
> > > Hi Shiva,
> > > Is it implemented already?
> > > In safari if i am sending a param and value which has trailing spaces 
> > > parameter itself got removed instead of trimming trailing spaces, where as

> > > in chrome we are getting deprecated warning symbol in console but it is 
> > > allowing trailing space in header.
> > > in chrome console i got redirected 
> > > to https://www.chromestatus.com/feature/6457425448140800
> > > 
> > > could you please clear overview?
> > > 
> > > On Friday, August 21, 2015 at 7:51:58 AM UTC+2, mailto:shiv...@samsung.com
> > wrote:
> > > >
> > > > On 2015/08/20 16:56:41, shiva.jm wrote: 
> > > > > added deprecation warnings and counter, pls have a look. 
> > > > > Should we add CONSOLE Warning in all XHR and Fetch tests?. 
> > > >
> > > > Using UseCounter::countDeprecation() in Fetch is failing some tests, 
> > > > from FetchHeaderList.cpp and AssociatedURLLoader.cpp, getting context/ 
> > > > document is not available, so need to use 
> > > > UseCounter::deprecationMessage(). 
> > > >
> > > > https://codereview.chromium.org/1018903002/ 
> > > >
> > > 
> > > -- 
> > > You received this message because you are subscribed to the Google Groups
> > "Blink
> > > Reviews" group.
> > > To unsubscribe from this group and stop receiving emails from it, send an
> > email
> > > to mailto:blink-reviews+unsubscribe@chromium.org.
> > 
> > 
> > It's not implemented yet, we just show deprecated warning as of now.
> > As per plan, we added deprecated warnings in XHR/Fetch and UMA for XHR and
Net
> > as of now, based on these measure next plan was to update the 
> > code as per RFC 7230.
> > Related CLs and intent link:  https://codereview.chromium.org/1358203003/, 
> > https://codereview.chromium.org/1018903002/, 
> > https://codereview.chromium.org/1374883002/,
> > https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/K5jd8Y5l6pI
> 
> Hi,
> 
> I'll restart the discussion at the Intent with the UMA numbers.

Hi,
Yes, Indeed i am getting warninig message as it is deprecated but if it is
implemented in near future the implementation will remove the first and trailing
spaces of the parameter value or it will remove the parameter itself.
eg:
{"headParam":"Testing "} will be implemented as {"headParam":"Testing"} or
"headParam" will be removed from header?

Powered by Google App Engine
This is Rietveld 408576698