From a5bdc6236ad52586579a9a3da6a059835ed60761 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 23 Jul 2018 15:06:11 +0200 Subject: 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 --- src/core/net/url_request_custom_job_proxy.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/core/net/url_request_custom_job_proxy.cpp') 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 initiator) +void URLRequestCustomJobProxy::initialize(GURL url, std::string method, base::Optional initiator, QMap 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); } -- cgit v1.2.3