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

Unified Diff: Source/modules/fetch/FetchManager.cpp

Issue 1143083002: Implement request's redirect mode and RequestRedirect for Fetch (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/modules/fetch/FetchManager.cpp
diff --git a/Source/modules/fetch/FetchManager.cpp b/Source/modules/fetch/FetchManager.cpp
index 29b2f61ea1404304127a1d3fe565bbd53ff39aa9..27644d211257aef6af01557fc1afb3bfecbd6463 100644
--- a/Source/modules/fetch/FetchManager.cpp
+++ b/Source/modules/fetch/FetchManager.cpp
@@ -285,6 +285,7 @@ void FetchManager::Loader::start()
|| m_request->headerList()->containsNonSimpleHeader()))) {
// "Set |request|'s response tainting to |CORS|."
m_request->setResponseTainting(FetchRequestData::CORSTainting);
+ m_request->setRedirect(WebURLRequest::FetchRedirectModeError);
// "The result of performing an HTTP fetch using |request| with the
// |CORS flag| and |CORS preflight flag| set."
performHTTPFetch(true, true);
@@ -361,6 +362,7 @@ void FetchManager::Loader::performHTTPFetch(bool corsFlag, bool corsPreflightFla
// FIXME: Support body.
ResourceRequest request(m_request->url());
request.setRequestContext(m_request->context());
+ request.setFetchRedirectMode(m_request->redirect());
request.setHTTPMethod(m_request->method());
const Vector<OwnPtr<FetchHeaderList::Header>>& list = m_request->headerList()->list();
for (size_t i = 0; i < list.size(); ++i) {
« no previous file with comments | « LayoutTests/http/tests/serviceworker/resources/fetch-request-xhr-worker.js ('k') | Source/modules/fetch/FetchRequestData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698