|
|
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. |
DescriptionDon'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)
Description was changed from ========== Check request_->has_upload() in ServiceWorkerURLRequestJob::CreateFetchRequest() BUG=573937 ========== to ========== Check request_->has_upload() in ServiceWorkerURLRequestJob::CreateFetchRequest() 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 will cause an error when "fetch(request.event)" is called in the ServiceWorker. To fix this problem, this patch add has_upload() check in ServiceWorkerURLRequestJob::CreateFetchRequest(). BUG=573937 ==========
Description was changed from ========== Check request_->has_upload() in ServiceWorkerURLRequestJob::CreateFetchRequest() 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 will cause an error when "fetch(request.event)" is called in the ServiceWorker. To fix this problem, this patch add has_upload() check in ServiceWorkerURLRequestJob::CreateFetchRequest(). BUG=573937 ========== to ========== Check request_->has_upload() in ServiceWorkerURLRequestJob::CreateFetchRequest() 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(request.event)" is called in the ServiceWorker. To fix this problem, this patch add has_upload() check in ServiceWorkerURLRequestJob::CreateFetchRequest(). BUG=573937 ==========
Description was changed from ========== Check request_->has_upload() in ServiceWorkerURLRequestJob::CreateFetchRequest() 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(request.event)" is called in the ServiceWorker. To fix this problem, this patch add has_upload() check in ServiceWorkerURLRequestJob::CreateFetchRequest(). BUG=573937 ========== to ========== Check request_->has_upload() in ServiceWorkerURLRequestJob::CreateFetchRequest() 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(request.event)" is called in the ServiceWorker. To fix this problem, this patch adds has_upload() check in ServiceWorkerURLRequestJob::CreateFetchRequest(). BUG=573937 ==========
Description was changed from ========== Check request_->has_upload() in ServiceWorkerURLRequestJob::CreateFetchRequest() 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(request.event)" is called in the ServiceWorker. To fix this problem, this patch adds has_upload() check in ServiceWorkerURLRequestJob::CreateFetchRequest(). BUG=573937 ========== to ========== Check request_->has_upload() in ServiceWorkerURLRequestJob::CreateFetchRequest() 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(request.event)" is called in the ServiceWorker. It is because request.body must be unset when request.method is GET. To fix this problem, this patch adds has_upload() check in ServiceWorkerURLRequestJob::CreateFetchRequest(). BUG=573937 ==========
Description was changed from ========== Check request_->has_upload() in ServiceWorkerURLRequestJob::CreateFetchRequest() 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(request.event)" is called in the ServiceWorker. It is because request.body must be unset when request.method is GET. To fix this problem, this patch adds has_upload() check in ServiceWorkerURLRequestJob::CreateFetchRequest(). BUG=573937 ========== to ========== Check request_->has_upload() in ServiceWorkerURLRequestJob::CreateFetchRequest() 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(request.event)" is called in the ServiceWorker. It is because request.body must not be when request.method is GET. To fix this problem, this patch adds has_upload() check in ServiceWorkerURLRequestJob::CreateFetchRequest(). BUG=573937 ==========
Description was changed from ========== Check request_->has_upload() in ServiceWorkerURLRequestJob::CreateFetchRequest() 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(request.event)" is called in the ServiceWorker. It is because request.body must not be when request.method is GET. To fix this problem, this patch adds has_upload() check in ServiceWorkerURLRequestJob::CreateFetchRequest(). BUG=573937 ========== to ========== Check request_->has_upload() in ServiceWorkerURLRequestJob::CreateFetchRequest() 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(request.event)" 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 ==========
Description was changed from ========== Check request_->has_upload() in ServiceWorkerURLRequestJob::CreateFetchRequest() 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(request.event)" 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 ========== to ========== 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(request.event)" 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 ==========
Description was changed from ========== 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(request.event)" 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 ========== to ========== 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 ==========
horo@chromium.org changed reviewers: + falken@chromium.org
falken@ Could you please review this?
lgtm https://codereview.chromium.org/1612423002/diff/20001/third_party/WebKit/Layo... File third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-redirect-body.html (right): https://codereview.chromium.org/1612423002/diff/20001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-redirect-body.html:22: var hiddenInput = document.createElement('input'); nit: snake_case here and throughout https://codereview.chromium.org/1612423002/diff/20001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-redirect-body.html:38: var frameLoadPromise = new Promise(function(resolve) { I think function(resolve)'s body needs an additional two space indent. https://codereview.chromium.org/1612423002/diff/20001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-redirect-body.html:39: frame.addEventListener('load', function() { same with this function() https://codereview.chromium.org/1612423002/diff/20001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-redirect-body.html:53: console.log(decodeURIComponent(text)); debug output?
Thank you! https://codereview.chromium.org/1612423002/diff/20001/third_party/WebKit/Layo... File third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-redirect-body.html (right): https://codereview.chromium.org/1612423002/diff/20001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-redirect-body.html:22: var hiddenInput = document.createElement('input'); On 2016/01/25 04:51:57, falken wrote: > nit: snake_case here and throughout Done. https://codereview.chromium.org/1612423002/diff/20001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-redirect-body.html:38: var frameLoadPromise = new Promise(function(resolve) { On 2016/01/25 04:51:57, falken wrote: > I think function(resolve)'s body needs an additional two space indent. Done. https://codereview.chromium.org/1612423002/diff/20001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-redirect-body.html:39: frame.addEventListener('load', function() { On 2016/01/25 04:51:57, falken wrote: > same with this function() Done. https://codereview.chromium.org/1612423002/diff/20001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-redirect-body.html:53: console.log(decodeURIComponent(text)); On 2016/01/25 04:51:57, falken wrote: > debug output? Removed
The CQ bit was checked by horo@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from falken@chromium.org Link to the patchset: https://codereview.chromium.org/1612423002/#ps40001 (title: "incorporated falken's comment")
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
Message was sent while issue was closed.
Description was changed from ========== 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 ========== to ========== 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 ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001)
Message was sent while issue was closed.
Description was changed from ========== 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 ========== to ========== 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} ==========
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/8f8aeea280e577fc8dddd2aeb6747f47f3ec502e Cr-Commit-Position: refs/heads/master@{#371196} |