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

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

Issue 1305183009: CREDENTIAL: Extend FormData opacity to created Request objects (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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/Request.cpp
diff --git a/Source/modules/fetch/Request.cpp b/Source/modules/fetch/Request.cpp
index 830023c354a4805da7e9da4964140a6ab7a96127..f60d832e813ee1e41414f377a55986d34a648bf0 100644
--- a/Source/modules/fetch/Request.cpp
+++ b/Source/modules/fetch/Request.cpp
@@ -263,6 +263,10 @@ Request* Request::createRequestWithRequestOrString(ScriptState* scriptState, Req
if (temporaryBody)
r->m_request->setBuffer(temporaryBody);
+ // https://w3c.github.io/webappsec/specs/credentialmanagement/#monkey-patching-fetch-2
+ if (init.opaque || (inputRequest && inputRequest->opaque()))
+ r->makeOpaque();
+
// "34. Set |r|'s MIME type to the result of extracting a MIME type from
// |r|'s request's header list."
r->m_request->setMIMEType(r->m_request->headerList()->extractMIMEType());

Powered by Google App Engine
This is Rietveld 408576698