diff options
author | Szabolcs David <davidsz@inf.u-szeged.hu> | 2015-09-28 05:54:37 -0700 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-09-29 14:51:41 +0000 |
commit | 117d70f5c719cc6775eb5a653c887e68037b9a93 (patch) | |
tree | f2a8c9cb49af340857239113535999792a6e2000 /src | |
parent | 8b1dc2b5c4c73cfb98d14f9abf2afaacb2494925 (diff) |
Remove whitespaces from custom HTTP user agents
This prevents adding additional headers to the outgoing
HTTP request through overridden user agent and unskips
userAgentNewlineStripping API test.
Change-Id: If9b3a88b0346058a7dc462471637d9777683fe82
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/browser_context_adapter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/browser_context_adapter.cpp b/src/core/browser_context_adapter.cpp index 660c6ffb2..02fa207c9 100644 --- a/src/core/browser_context_adapter.cpp +++ b/src/core/browser_context_adapter.cpp @@ -255,12 +255,12 @@ void BrowserContextAdapter::setHttpUserAgent(const QString &userAgent) { if (m_httpUserAgent == userAgent) return; - m_httpUserAgent = userAgent; + m_httpUserAgent = userAgent.simplified(); std::vector<content::WebContentsImpl *> list = content::WebContentsImpl::GetAllWebContents(); Q_FOREACH (content::WebContentsImpl *web_contents, list) if (web_contents->GetBrowserContext() == m_browserContext.data()) - web_contents->SetUserAgentOverride(userAgent.toStdString()); + web_contents->SetUserAgentOverride(m_httpUserAgent.toStdString()); if (m_browserContext->url_request_getter_.get()) m_browserContext->url_request_getter_->updateUserAgent(); |