Skip to content

Commit

Permalink
[ServiceWorker] Pass FetchEvent related properties of WebURLRequest t…
Browse files Browse the repository at this point in the history
…o Blink for redirect responses.

Currently SkipServiceWorker and FetchRequestMode and FetchCredentialsMode are not set correctly when performing redirects.
This breaks our CORS checking functionality related to ServiceWorker's FetchEvent.

I will add LayoutTests for this later.
https://codereview.chromium.org/712303002/

BUG=431985

Review URL: https://codereview.chromium.org/705273004

Cr-Commit-Position: refs/heads/master@{#303761}
  • Loading branch information
horo-t authored and Commit bot committed Nov 12, 2014
1 parent 3655274 commit cd1e2f2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions content/child/web_url_loader_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,9 @@ bool WebURLLoaderImpl::Context::OnReceivedRedirect(
new_request.setDownloadToFile(request_.downloadToFile());
new_request.setRequestContext(request_.requestContext());
new_request.setFrameType(request_.frameType());
new_request.setSkipServiceWorker(request_.skipServiceWorker());
new_request.setFetchRequestMode(request_.fetchRequestMode());
new_request.setFetchCredentialsMode(request_.fetchCredentialsMode());

new_request.setHTTPReferrer(WebString::fromUTF8(redirect_info.new_referrer),
referrer_policy_);
Expand Down

0 comments on commit cd1e2f2

Please sign in to comment.