Index: Source/web/WebLocalFrameImpl.cpp |
diff --git a/Source/web/WebLocalFrameImpl.cpp b/Source/web/WebLocalFrameImpl.cpp |
index c508c7f825670dc38d164d6192373edcbba25fd8..8dab932675e648cae512e01d43219ca9a8f8fa7a 100644 |
--- a/Source/web/WebLocalFrameImpl.cpp |
+++ b/Source/web/WebLocalFrameImpl.cpp |
@@ -923,11 +923,8 @@ bool WebLocalFrameImpl::isViewSourceModeEnabled() const |
void WebLocalFrameImpl::setReferrerForRequest(WebURLRequest& request, const WebURL& referrerURL) |
{ |
- String referrer = referrerURL.isEmpty() ? frame()->document()->outgoingReferrer() : String(referrerURL.spec().utf16()); |
- referrer = SecurityPolicy::generateReferrerHeader(frame()->document()->referrerPolicy(), request.url(), referrer); |
- if (referrer.isEmpty()) |
- return; |
- request.setHTTPReferrer(referrer, static_cast<WebReferrerPolicy>(frame()->document()->referrerPolicy())); |
+ String referrerString = referrerURL.isEmpty() ? frame()->document()->outgoingReferrer() : String(referrerURL.spec().utf16()); |
+ request.toMutableResourceRequest().setHTTPReferrer(SecurityPolicy::generateReferrerHeader(frame()->document()->referrerPolicy(), request.url(), referrerString)); |
} |
void WebLocalFrameImpl::dispatchWillSendRequest(WebURLRequest& request) |