summaryrefslogtreecommitdiffstats
path: root/src/core/net/url_request_custom_job_proxy.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-07-23 15:06:11 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-08-03 22:21:46 +0000
commita5bdc6236ad52586579a9a3da6a059835ed60761 (patch)
tree0990effe331cea168cec1c33593af2f640c880a6 /src/core/net/url_request_custom_job_proxy.cpp
parent14a8ac1534bc4314cf6c89aceaaa382f42314dac (diff)
Add HTTP request headers to custom URL schemes
Makes it possible to read extra headers added to the request. Change-Id: I4af0ba8a5b28488b8f12a2cff29807575c24f026 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/core/net/url_request_custom_job_proxy.cpp')
-rw-r--r--src/core/net/url_request_custom_job_proxy.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/net/url_request_custom_job_proxy.cpp b/src/core/net/url_request_custom_job_proxy.cpp
index 5280318ad..10ca4d0b1 100644
--- a/src/core/net/url_request_custom_job_proxy.cpp
+++ b/src/core/net/url_request_custom_job_proxy.cpp
@@ -152,7 +152,7 @@ void URLRequestCustomJobProxy::readyRead()
m_job->notifyReadyRead();
}
-void URLRequestCustomJobProxy::initialize(GURL url, std::string method, base::Optional<url::Origin> initiator)
+void URLRequestCustomJobProxy::initialize(GURL url, std::string method, base::Optional<url::Origin> initiator, QMap<QByteArray, QByteArray> headers)
{
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
Q_ASSERT(!m_delegate);
@@ -169,7 +169,8 @@ void URLRequestCustomJobProxy::initialize(GURL url, std::string method, base::Op
if (schemeHandler) {
m_delegate = new URLRequestCustomJobDelegate(this, toQt(url),
QByteArray::fromStdString(method),
- initiatorOrigin);
+ initiatorOrigin,
+ headers);
QWebEngineUrlRequestJob *requestJob = new QWebEngineUrlRequestJob(m_delegate);
schemeHandler->requestStarted(requestJob);
}