summaryrefslogtreecommitdiffstats
path: root/src/core/net/proxying_url_loader_factory_qt.cpp
diff options
context:
space:
mode:
authorJüri Valdmann <juri.valdmann@qt.io>2019-11-29 12:18:39 +0100
committerJüri Valdmann <juri.valdmann@qt.io>2019-12-10 22:16:03 +0100
commit2db73d8f7296cc36c2ea222b83dab98ce27982ea (patch)
treeac07359d44a95351bdcdd4de8d12b6e04adb6712 /src/core/net/proxying_url_loader_factory_qt.cpp
parent0be009d9c734b7c5e4d9113f3ea19286c94243ab (diff)
Fix firstPartyUrl with network service
Change-Id: If51e4ef40172ade46d776a384b449b22afbe73c4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/net/proxying_url_loader_factory_qt.cpp')
-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);