diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-07-15 17:35:40 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-07-15 17:36:09 (GMT) |
commit | 81049e49971a9f285f36204d6013c3172866718c (patch) | |
tree | 0afcff3170b445954e78a17ff2b6fdba7b003ee9 /src | |
parent | 4ce8c7af12cf9349beb692304808934f6de9cb83 (diff) | |
download | Qt-81049e49971a9f285f36204d6013c3172866718c.zip Qt-81049e49971a9f285f36204d6013c3172866718c.tar.gz Qt-81049e49971a9f285f36204d6013c3172866718c.tar.bz2 |
Add a "User-Agent" line to our HTTP proxy requests.
Apparently some proxy servers can be configured to deny requests based
on User-Agent, even for CONNECT connections. See
https://bugs.kde.org/show_bug.cgi?id=155707#c155 for an example (packet
dump in #c157, analysis in #c158).
So send a User-Agent header with value "Mozilla/5.0", hoping that this
will be enough to allow the connection. I hope it will, because other
tools like libtool send something completely different:
User-Agent: curl/7.19.5 (i586-mandriva-linux-gnu) libcurl/7.19.5
GnuTLS/2.8.1 zlib/1.2.3 c-ares/1.6.0 libidn/1.15 libssh2/1.0
Reviewed-by: TrustMe
Diffstat (limited to 'src')
-rw-r--r-- | src/network/socket/qhttpsocketengine.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/network/socket/qhttpsocketengine.cpp b/src/network/socket/qhttpsocketengine.cpp index 7bac1f2..156a9f4 100644 --- a/src/network/socket/qhttpsocketengine.cpp +++ b/src/network/socket/qhttpsocketengine.cpp @@ -454,6 +454,7 @@ void QHttpSocketEngine::slotSocketConnected() data += path; data += " HTTP/1.1\r\n"; data += "Proxy-Connection: keep-alive\r\n" + "User-Agent: Mozilla/5.0\r\n" "Host: " + peerAddress + "\r\n"; QAuthenticatorPrivate *priv = QAuthenticatorPrivate::getPrivate(d->authenticator); //qDebug() << "slotSocketConnected: priv=" << priv << (priv ? (int)priv->method : -1); |