summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/net/proxying_url_loader_factory_qt.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/net/proxying_url_loader_factory_qt.cpp b/src/core/net/proxying_url_loader_factory_qt.cpp
index 84b1d0777..173e19eeb 100644
--- a/src/core/net/proxying_url_loader_factory_qt.cpp
+++ b/src/core/net/proxying_url_loader_factory_qt.cpp
@@ -226,11 +226,16 @@ void InterceptedRequest::InterceptOnUIThread()
const QUrl initiator = request_.request_initiator.has_value() ? toQt(request_.request_initiator->GetURL()) : QUrl();
- // FIXME: request_.first_party_url is currently always empty.
+ QUrl firstPartyUrl;
+ if (resourceType == content::ResourceType::kSubFrame)
+ firstPartyUrl = toQt(request_.first_party_url);
+ else
+ firstPartyUrl = toQt(request_.site_for_cookies);
+
QWebEngineUrlRequestInfoPrivate *infoPrivate = new QWebEngineUrlRequestInfoPrivate(toQt(resourceType),
toQt(navigationType),
qUrl,
- toQt(request_.site_for_cookies),
+ firstPartyUrl,
initiator,
QByteArray::fromStdString(request_.method));
QWebEngineUrlRequestInfo requestInfo(infoPrivate);