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

Unified Diff: Source/core/loader/FrameFetchContext.cpp

Issue 1022093002: Upgrade: Drop the 'upgraded' signal, expand the 'https' signal. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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
« no previous file with comments | « no previous file | Source/core/loader/FrameFetchContextTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/FrameFetchContext.cpp
diff --git a/Source/core/loader/FrameFetchContext.cpp b/Source/core/loader/FrameFetchContext.cpp
index 2719e0a5b05120cd7848392106f574013c06e00c..bd1bdea298febe500154af291d5c17ae6c28fd75 100644
--- a/Source/core/loader/FrameFetchContext.cpp
+++ b/Source/core/loader/FrameFetchContext.cpp
@@ -635,10 +635,10 @@ void FrameFetchContext::upgradeInsecureRequest(FetchRequest& fetchRequest)
KURL url = fetchRequest.resourceRequest().url();
- // Tack a 'Prefer' header to outgoing navigational requests, as described in
+ // Tack an 'HTTPS' header to outgoing navigational requests, as described in
// https://w3c.github.io/webappsec/specs/upgrade/#feature-detect
- if (fetchRequest.resourceRequest().frameType() != WebURLRequest::FrameTypeNone && !SecurityOrigin::isSecure(url))
- fetchRequest.mutableResourceRequest().addHTTPHeaderField("Prefer", "tls");
+ if (fetchRequest.resourceRequest().frameType() != WebURLRequest::FrameTypeNone)
+ fetchRequest.mutableResourceRequest().addHTTPHeaderField("HTTPS", "1");
if (m_document->insecureRequestsPolicy() == SecurityContext::InsecureRequestsUpgrade && url.protocolIs("http")) {
ASSERT(m_document->insecureNavigationsToUpgrade());
@@ -658,7 +658,6 @@ void FrameFetchContext::upgradeInsecureRequest(FetchRequest& fetchRequest)
if (url.port() == 80)
url.setPort(443);
fetchRequest.mutableResourceRequest().setURL(url);
- fetchRequest.mutableResourceRequest().addHTTPHeaderField("Upgraded", "1");
}
}
}
« no previous file with comments | « no previous file | Source/core/loader/FrameFetchContextTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698