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

Issue 1612423002: Don't send the body of the redirected request to the ServiceWorker. (Closed)

Created:
4 years, 11 months ago by horo
Modified:
4 years, 11 months ago
Reviewers:
falken
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, tzik, serviceworker-reviews, jam, kinuko+serviceworker, nhiroki, darin-cc_chromium.org, horo+watch_chromium.org, kinuko+watch, blink-worker-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Don't send the body of the redirected request to the ServiceWorker. The upload data in URLRequest is cleared while handing redirects in URLRequest::Redirect(). But ServiceWorkerURLRequestJob doesn't check it while re-sending the FetchEvent to the ServiceWorker. This causes an error when "fetch(event.request)" is called in the ServiceWorker. It is because request.body must not be set when request.method is GET. To fix this problem, this patch adds has_upload() check in ServiceWorkerURLRequestJob::CreateFetchRequest(). BUG=573937 TEST=http/tests/serviceworker/navigation-redirect-body.html Committed: https://crrev.com/8f8aeea280e577fc8dddd2aeb6747f47f3ec502e Cr-Commit-Position: refs/heads/master@{#371196}

Patch Set 1 #

Patch Set 2 : add LayoutTest #

Total comments: 8

Patch Set 3 : incorporated falken's comment #

Messages

Total messages: 19 (13 generated)
horo
falken@ Could you please review this?
4 years, 11 months ago (2016-01-25 04:35:37 UTC) #10
falken
lgtm https://codereview.chromium.org/1612423002/diff/20001/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-redirect-body.html File third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-redirect-body.html (right): https://codereview.chromium.org/1612423002/diff/20001/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-redirect-body.html#newcode22 third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-redirect-body.html:22: var hiddenInput = document.createElement('input'); nit: snake_case here and ...
4 years, 11 months ago (2016-01-25 04:51:57 UTC) #11
horo
Thank you! https://codereview.chromium.org/1612423002/diff/20001/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-redirect-body.html File third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-redirect-body.html (right): https://codereview.chromium.org/1612423002/diff/20001/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-redirect-body.html#newcode22 third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-redirect-body.html:22: var hiddenInput = document.createElement('input'); On 2016/01/25 04:51:57, ...
4 years, 11 months ago (2016-01-25 05:14: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/1612423002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1612423002/40001
4 years, 11 months ago (2016-01-25 05:15:38 UTC) #15
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 11 months ago (2016-01-25 07:35:48 UTC) #17
commit-bot: I haz the power
4 years, 11 months ago (2016-01-25 07:36:45 UTC) #19
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/8f8aeea280e577fc8dddd2aeb6747f47f3ec502e
Cr-Commit-Position: refs/heads/master@{#371196}

Powered by Google App Engine
This is Rietveld 408576698