diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2011-05-06 08:07:16 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2011-05-06 08:07:39 (GMT) |
commit | 4b35a36ca088a79c1aac877d3259e8a981399ee9 (patch) | |
tree | fc233cc0f2aa9e6de91b9d95037d218327cc0cc9 /src/network/access | |
parent | 1d9a18142eb19d5dde93b7e5c63f9be0e4caf896 (diff) | |
parent | 718013958724210915b24142c499154f751f0bac (diff) | |
download | Qt-4b35a36ca088a79c1aac877d3259e8a981399ee9.zip Qt-4b35a36ca088a79c1aac877d3259e8a981399ee9.tar.gz Qt-4b35a36ca088a79c1aac877d3259e8a981399ee9.tar.bz2 |
Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7
Conflicts:
src/gui/painting/qpainterpath.cpp
src/gui/text/qfontengine_ft.cpp
src/s60installs/eabi/QtGuiu.def
Diffstat (limited to 'src/network/access')
-rw-r--r-- | src/network/access/qhttpnetworkconnectionchannel.cpp | 6 | ||||
-rw-r--r-- | src/network/access/qnetworkreplyimpl.cpp | 8 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index 6fbc6f8..b738ccf 100644 --- a/src/network/access/qhttpnetworkconnectionchannel.cpp +++ b/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -579,6 +579,12 @@ bool QHttpNetworkConnectionChannel::ensureConnection() connectHost = connection->d_func()->networkProxy.hostName(); connectPort = connection->d_func()->networkProxy.port(); } + if (socket->proxy().type() == QNetworkProxy::HttpProxy) { + // Make user-agent field available to HTTP proxy socket engine (QTBUG-17223) + QByteArray value = request.headerField("user-agent"); + if (!value.isEmpty()) + socket->setProperty("_q_user-agent", value); + } #endif if (ssl) { #ifndef QT_NO_OPENSSL diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp index 9eb505d..de2913a 100644 --- a/src/network/access/qnetworkreplyimpl.cpp +++ b/src/network/access/qnetworkreplyimpl.cpp @@ -1010,10 +1010,6 @@ bool QNetworkReplyImplPrivate::migrateBackend() if (state == Finished || state == Aborted) return true; - // Backend does not support resuming download. - if (!backend->canResume()) - return false; - // Request has outgoing data, not migrating. if (outgoingData) return false; @@ -1022,6 +1018,10 @@ bool QNetworkReplyImplPrivate::migrateBackend() if (copyDevice) return true; + // Backend does not support resuming download. + if (!backend->canResume()) + return false; + state = QNetworkReplyImplPrivate::Reconnecting; if (backend) { |