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

Issue 1301523002: [Fetch API] Send request body as a FormData. (Closed)

Created:
5 years, 4 months ago by yhirano
Modified:
5 years, 4 months ago
CC:
blink-reviews, caseq+blink_chromium.org, yurys+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, apavlov+blink_chromium.org, devtools-reviews_chromium.org, sergeyv+blink_chromium.org, kozyatinskiy+blink_chromium.org
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

[Fetch API] Send request body as a FormData. Previously fetch() sent request's body data as a blob. That made the data invisible from the devtools. Now it sends the body data as a form data to fix the issue. BUG=457484 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=200725

Patch Set 1 #

Total comments: 5

Patch Set 2 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+62 lines, -69 lines) Patch
A + LayoutTests/http/tests/inspector/network/network-fetch-post-payload.html View 1 2 chunks +2 lines, -2 lines 0 comments Download
A LayoutTests/http/tests/inspector/network/network-fetch-post-payload-expected.txt View 1 chunk +4 lines, -0 lines 0 comments Download
M Source/modules/fetch/BodyStreamBuffer.h View 2 chunks +2 lines, -0 lines 0 comments Download
M Source/modules/fetch/BodyStreamBuffer.cpp View 2 chunks +15 lines, -0 lines 0 comments Download
M Source/modules/fetch/FetchManager.cpp View 1 chunk +2 lines, -6 lines 0 comments Download
M Source/modules/fetch/Request.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/fetch/Request.cpp View 6 chunks +10 lines, -8 lines 0 comments Download
M Source/modules/fetch/RequestInit.h View 2 chunks +4 lines, -2 lines 0 comments Download
M Source/modules/fetch/RequestInit.cpp View 2 chunks +22 lines, -50 lines 2 comments Download

Messages

Total messages: 18 (6 generated)
yhirano
5 years, 4 months ago (2015-08-17 06:49:20 UTC) #2
yhirano
On 2015/08/17 06:49:20, yhirano wrote: This CL depends on https://codereview.chromium.org/1265413002/.
5 years, 4 months ago (2015-08-17 06:53:28 UTC) #3
hiroshige
lgtm for modules/fetch part with a nit. https://codereview.chromium.org/1301523002/diff/1/Source/modules/fetch/Request.h File Source/modules/fetch/Request.h (left): https://codereview.chromium.org/1301523002/diff/1/Source/modules/fetch/Request.h#oldcode71 Source/modules/fetch/Request.h:71: static Request* ...
5 years, 4 months ago (2015-08-17 08:46:02 UTC) #4
caseq
devtools tests lgtm https://codereview.chromium.org/1301523002/diff/1/LayoutTests/http/tests/inspector/network/network-fetch-post-payload.html File LayoutTests/http/tests/inspector/network/network-fetch-post-payload.html (right): https://codereview.chromium.org/1301523002/diff/1/LayoutTests/http/tests/inspector/network/network-fetch-post-payload.html#newcode11 LayoutTests/http/tests/inspector/network/network-fetch-post-payload.html:11: InspectorTest.makeFetch("resources/resource.php?foo", {method: 'POST', body: payload}, step2); ...
5 years, 4 months ago (2015-08-17 17:24:38 UTC) #5
yhirano
https://codereview.chromium.org/1301523002/diff/1/LayoutTests/http/tests/inspector/network/network-fetch-post-payload.html File LayoutTests/http/tests/inspector/network/network-fetch-post-payload.html (right): https://codereview.chromium.org/1301523002/diff/1/LayoutTests/http/tests/inspector/network/network-fetch-post-payload.html#newcode11 LayoutTests/http/tests/inspector/network/network-fetch-post-payload.html:11: InspectorTest.makeFetch("resources/resource.php?foo", {method: 'POST', body: payload}, step2); On 2015/08/17 17:24:38, ...
5 years, 4 months ago (2015-08-18 09:12:39 UTC) #6
hiroshige
lgtm. https://codereview.chromium.org/1301523002/diff/1/Source/modules/fetch/Request.h File Source/modules/fetch/Request.h (left): https://codereview.chromium.org/1301523002/diff/1/Source/modules/fetch/Request.h#oldcode71 Source/modules/fetch/Request.h:71: static Request* createRequestWithRequestOrString(ScriptState*, Request*, const String&, const RequestInit&, ...
5 years, 4 months ago (2015-08-18 09:36:53 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1301523002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1301523002/20001
5 years, 4 months ago (2015-08-18 10:19:06 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/40866)
5 years, 4 months ago (2015-08-18 11:30:51 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1301523002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1301523002/20001
5 years, 4 months ago (2015-08-18 11:55:27 UTC) #14
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://src.chromium.org/viewvc/blink?view=rev&revision=200725
5 years, 4 months ago (2015-08-18 12:35:09 UTC) #15
brucedawson
https://codereview.chromium.org/1301523002/diff/20001/Source/modules/fetch/RequestInit.cpp File Source/modules/fetch/RequestInit.cpp (right): https://codereview.chromium.org/1301523002/diff/20001/Source/modules/fetch/RequestInit.cpp#newcode41 Source/modules/fetch/RequestInit.cpp:41: RefPtr<FormData> formData = FormData::create(); This variable declaration appears to ...
5 years, 4 months ago (2015-08-19 16:45:28 UTC) #17
yhirano
5 years, 4 months ago (2015-08-20 02:16:49 UTC) #18
Message was sent while issue was closed.
https://codereview.chromium.org/1301523002/diff/20001/Source/modules/fetch/Re...
File Source/modules/fetch/RequestInit.cpp (right):

https://codereview.chromium.org/1301523002/diff/20001/Source/modules/fetch/Re...
Source/modules/fetch/RequestInit.cpp:41: RefPtr<FormData> formData =
FormData::create();
On 2015/08/19 16:45:28, brucedawson wrote:
> This variable declaration appears to have no value. It is shadowed by another
> declaration of the same name and type on line 52 such that this variable is
> never actually referenced.
> 
> It's not a 'bug', but it could be confusing to human readers.
> 
> This was found as a new /analyze variable shadowing warning.

Thank you! I will fix it.

Powered by Google App Engine
This is Rietveld 408576698