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

Issue 1258933002: Make the Response constructor throw when status is a null body status and body is non-null (Closed)

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

Description

Make the Response constructor throw when status is a null body status (i.e 101, 204, 205, or 304) and body is non-null Spec Issue link: https://fetch.spec.whatwg.org/#dom-response, https://github.com/whatwg/fetch/issues/86, https://github.com/whatwg/fetch/issues/94 and https://github.com/whatwg/fetch/issues/96 BUG=514174 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=199894

Patch Set 1 #

Total comments: 15

Patch Set 2 : #

Patch Set 3 : #

Total comments: 3

Patch Set 4 : #

Patch Set 5 : #

Total comments: 3

Patch Set 6 : #

Total comments: 4

Patch Set 7 : #

Patch Set 8 : #

Total comments: 9

Patch Set 9 : #

Patch Set 10 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -7 lines) Patch
M LayoutTests/http/tests/fetch/script-tests/response.js View 1 2 3 4 5 6 7 8 2 chunks +10 lines, -1 line 0 comments Download
M Source/modules/fetch/Response.cpp View 1 2 3 4 5 6 7 8 9 3 chunks +23 lines, -6 lines 0 comments Download

Messages

Total messages: 38 (5 generated)
shiva.jm
pls have a look. But for status 101, it will throw range error, as it ...
5 years, 4 months ago (2015-07-27 10:04:41 UTC) #2
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/1258933002/diff/1/Source/modules/fetch/Response.cpp File Source/modules/fetch/Response.cpp (right): https://codereview.chromium.org/1258933002/diff/1/Source/modules/fetch/Response.cpp#newcode168 Source/modules/fetch/Response.cpp:168: exceptionState.throwTypeError("Invalid status"); Let's make this distinguishable with an error ...
5 years, 4 months ago (2015-07-27 11:26:53 UTC) #3
hiroshige
https://codereview.chromium.org/1258933002/diff/1/LayoutTests/http/tests/fetch/script-tests/response.js File LayoutTests/http/tests/fetch/script-tests/response.js (right): https://codereview.chromium.org/1258933002/diff/1/LayoutTests/http/tests/fetch/script-tests/response.js#newcode127 LayoutTests/http/tests/fetch/script-tests/response.js:127: new Response(new Blob(),{status: status}); nit: "new Response(new Blob(), {status: ...
5 years, 4 months ago (2015-07-27 11:30:47 UTC) #4
philipj_slow
https://codereview.chromium.org/1258933002/diff/1/Source/modules/fetch/Response.cpp File Source/modules/fetch/Response.cpp (left): https://codereview.chromium.org/1258933002/diff/1/Source/modules/fetch/Response.cpp#oldcode159 Source/modules/fetch/Response.cpp:159: exceptionState.throwRangeError("Invalid status"); ExceptionMessages::indexOutsideRange("status", status, 200, ExceptionMessages::InclusiveBound, 599, ExceptionMessages::InclusiveBound) should ...
5 years, 4 months ago (2015-07-27 11:36:08 UTC) #5
hiroshige
And thanks for following the spec update! Created Issue 514174. Could you refer to it ...
5 years, 4 months ago (2015-07-27 11:44:51 UTC) #6
shiva.jm
Updated review comments and tests, pls have a look. https://codereview.chromium.org/1258933002/diff/1/LayoutTests/http/tests/fetch/script-tests/response.js File LayoutTests/http/tests/fetch/script-tests/response.js (right): https://codereview.chromium.org/1258933002/diff/1/LayoutTests/http/tests/fetch/script-tests/response.js#newcode127 LayoutTests/http/tests/fetch/script-tests/response.js:127: ...
5 years, 4 months ago (2015-07-27 11:56:11 UTC) #7
philipj_slow
On 2015/07/27 11:56:11, shiva.jm wrote: > Updated review comments and tests, pls have a look. ...
5 years, 4 months ago (2015-07-27 12:21:43 UTC) #8
shiva.jm
updated review comments, pls have a look. @philipj: Sorry, i missed the comments at line ...
5 years, 4 months ago (2015-07-28 06:11:23 UTC) #9
shiva.jm
updated issue description, pls have a look. https://codereview.chromium.org/1258933002/diff/1/Source/modules/fetch/Response.cpp File Source/modules/fetch/Response.cpp (left): https://codereview.chromium.org/1258933002/diff/1/Source/modules/fetch/Response.cpp#oldcode159 Source/modules/fetch/Response.cpp:159: exceptionState.throwRangeError("Invalid status"); ...
5 years, 4 months ago (2015-07-28 09:17:27 UTC) #10
philipj_slow
https://codereview.chromium.org/1258933002/diff/40001/Source/modules/fetch/Response.cpp File Source/modules/fetch/Response.cpp (right): https://codereview.chromium.org/1258933002/diff/40001/Source/modules/fetch/Response.cpp#newcode167 Source/modules/fetch/Response.cpp:167: // spec link, See https://github.com/whatwg/fetch/issues/86 for details The issue ...
5 years, 4 months ago (2015-07-28 09:52:51 UTC) #11
shiva.jm
On 2015/07/28 09:52:51, philipj wrote: > https://codereview.chromium.org/1258933002/diff/40001/Source/modules/fetch/Response.cpp > File Source/modules/fetch/Response.cpp (right): > > https://codereview.chromium.org/1258933002/diff/40001/Source/modules/fetch/Response.cpp#newcode167 > ...
5 years, 4 months ago (2015-07-28 11:04:19 UTC) #12
philipj_slow
On 2015/07/28 11:04:19, shiva.jm wrote: > On 2015/07/28 09:52:51, philipj wrote: > > > https://codereview.chromium.org/1258933002/diff/40001/Source/modules/fetch/Response.cpp ...
5 years, 4 months ago (2015-07-28 11:09:42 UTC) #13
philipj_slow
5 years, 4 months ago (2015-07-28 11:09:46 UTC) #14
shiva.jm
updated comments, pls have a look. @tyoshino, hiroshinge, shall we move null body status check ...
5 years, 4 months ago (2015-07-29 04:13:00 UTC) #15
shiva.jm
On 2015/07/29 04:13:00, shiva.jm wrote: > updated comments, pls have a look. > @tyoshino, hiroshinge, ...
5 years, 4 months ago (2015-07-29 05:33:37 UTC) #16
shiva.jm
Updated the tests and code as per new change in spec, https://github.com/whatwg/fetch/issues/94. pls have a ...
5 years, 4 months ago (2015-07-29 08:35:45 UTC) #17
philipj_slow
Removing self as reviewer to leave this to module owners, too many cooks in the ...
5 years, 4 months ago (2015-07-29 09:15:47 UTC) #19
hiroshige
The spec was changed again: https://github.com/whatwg/fetch/commit/1e0918db0593d3068e4f042225371069b147ed0c > @tyoshino, hiroshinge, shall we move null body status ...
5 years, 4 months ago (2015-07-29 10:09:14 UTC) #20
shiva.jm
updated the code and test as per latest spec. pls have a look. https://codereview.chromium.org/1258933002/diff/80001/Source/modules/fetch/Response.cpp File ...
5 years, 4 months ago (2015-07-29 11:22:25 UTC) #21
hiroshige
https://codereview.chromium.org/1258933002/diff/100001/Source/modules/fetch/Response.cpp File Source/modules/fetch/Response.cpp (right): https://codereview.chromium.org/1258933002/diff/100001/Source/modules/fetch/Response.cpp#newcode160 Source/modules/fetch/Response.cpp:160: // spec link, See https://fetch.spec.whatwg.org/#null-body-status for details" According to ...
5 years, 4 months ago (2015-07-29 11:49:11 UTC) #22
shiva.jm
On 2015/07/29 11:49:11, hiroshige wrote: > https://codereview.chromium.org/1258933002/diff/100001/Source/modules/fetch/Response.cpp > File Source/modules/fetch/Response.cpp (right): > > https://codereview.chromium.org/1258933002/diff/100001/Source/modules/fetch/Response.cpp#newcode160 > ...
5 years, 4 months ago (2015-07-29 12:03:20 UTC) #23
shiva.jm
updated the code and test as per latest spec. pls have a look. https://codereview.chromium.org/1258933002/diff/100001/Source/modules/fetch/Response.cpp File ...
5 years, 4 months ago (2015-07-30 09:10:43 UTC) #24
hiroshige
https://codereview.chromium.org/1258933002/diff/140001/LayoutTests/http/tests/fetch/script-tests/response.js File LayoutTests/http/tests/fetch/script-tests/response.js (right): https://codereview.chromium.org/1258933002/diff/140001/LayoutTests/http/tests/fetch/script-tests/response.js#newcode131 LayoutTests/http/tests/fetch/script-tests/response.js:131: }); Could you add a test for that 101 ...
5 years, 4 months ago (2015-07-30 11:20:40 UTC) #25
shiva.jm
updated tests and comments, pls have a look. https://codereview.chromium.org/1258933002/diff/140001/LayoutTests/http/tests/fetch/script-tests/response.js File LayoutTests/http/tests/fetch/script-tests/response.js (right): https://codereview.chromium.org/1258933002/diff/140001/LayoutTests/http/tests/fetch/script-tests/response.js#newcode131 LayoutTests/http/tests/fetch/script-tests/response.js:131: }); ...
5 years, 4 months ago (2015-07-30 11:47:16 UTC) #26
shiva.jm
updated now as per spec, pls have a look.
5 years, 4 months ago (2015-08-01 04:22:03 UTC) #27
hiroshige
lgtm. thanks! optional: including the word "null body status" in the CL description might be ...
5 years, 4 months ago (2015-08-03 08:26:14 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1258933002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1258933002/160001
5 years, 4 months ago (2015-08-03 09:02:16 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: blink_presubmit on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/blink_presubmit/builds/38962) linux_chromium_gn_rel on tryserver.blink (JOB_FAILED, ...
5 years, 4 months ago (2015-08-03 09:04:43 UTC) #32
shiva.jm
Updated patch to latest code, due to merge issue, pls have a look.
5 years, 4 months ago (2015-08-03 10:38:21 UTC) #33
hiroshige
On 2015/08/03 10:38:21, shiva.jm wrote: > Updated patch to latest code, due to merge issue, ...
5 years, 4 months ago (2015-08-03 11:19:23 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1258933002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1258933002/180001
5 years, 4 months ago (2015-08-03 11:19:56 UTC) #36
tyoshino (SeeGerritForStatus)
lgtm
5 years, 4 months ago (2015-08-03 11:48:36 UTC) #37
commit-bot: I haz the power
5 years, 4 months ago (2015-08-03 12:41:00 UTC) #38
Message was sent while issue was closed.
Committed patchset #10 (id:180001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=199894

Powered by Google App Engine
This is Rietveld 408576698