diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-11-06 02:17:00 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-11-06 02:17:00 (GMT) |
commit | 8b01937c36632fca8774e90d22ce2aaeb2df883d (patch) | |
tree | 1f036bcd4d27744c7a4db995d07251ef0e7f3a45 /src/network/access | |
parent | 7f6deb2d42933f59adbebc95b872e670978de3e6 (diff) | |
parent | 0c95cffd81a21f63f647dccd79ae425d157e9758 (diff) | |
download | Qt-8b01937c36632fca8774e90d22ce2aaeb2df883d.zip Qt-8b01937c36632fca8774e90d22ce2aaeb2df883d.tar.gz Qt-8b01937c36632fca8774e90d22ce2aaeb2df883d.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (45 commits)
mkspecs: Move QMAKE_CC and QMAKE_CXX from gcc-base.conf to g++-base.conf
mkspecs: Make linux-x86-openkode-g++ not include g++.conf directly
mkspecs: Include gcc-base-unix.conf from g++.conf to match old behavior
configure: Deal with multiple redefinitions of qmake variables
Split QScriptValue::call autotest into smaller tests.
Optimize and clean up QClipData::fixup()
There is no predefined qmake x11 scope for x11 builds.
Refactor tst_QScriptContext::throwError test.
Fixed whitespace.
Don't use scopes in mkspecs as configure does not support them
Fixed destination path for the S60 feedback plugin.
Don't put Objective-C sources in SOURCES
Fix regression in tst_maketestselftest::naming_convention.
Split monolithic QScriptEngine autotests into smaller tests
Add SunSpider and V8 benchmarks to benchmarks/script.pro
Push and pop the thread-default context for the current thread
Silence preprocessor warnings about __TARGET_ARCH_ARM not being defined.
Import SunSpider benchmarks for QtScript
Import V8 benchmarks for QtScript
Add more microbenchmarks for QScriptValue
...
Diffstat (limited to 'src/network/access')
-rw-r--r-- | src/network/access/qnetworkaccesshttpbackend.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp index afbb706..0ae2192 100644 --- a/src/network/access/qnetworkaccesshttpbackend.cpp +++ b/src/network/access/qnetworkaccesshttpbackend.cpp @@ -71,7 +71,7 @@ static QByteArray makeCacheKey(QNetworkAccessHttpBackend *backend, QNetworkProxy QUrl copy = backend->url(); bool isEncrypted = copy.scheme().toLower() == QLatin1String("https"); copy.setPort(copy.port(isEncrypted ? DefaultHttpsPort : DefaultHttpPort)); - result = copy.toEncoded(QUrl::RemovePassword | QUrl::RemovePath | + result = copy.toEncoded(QUrl::RemoveUserInfo | QUrl::RemovePath | QUrl::RemoveQuery | QUrl::RemoveFragment); #ifndef QT_NO_NETWORKPROXY @@ -349,10 +349,12 @@ void QNetworkAccessHttpBackend::validateCache(QHttpNetworkRequest &httpRequest, QNetworkRequest::CacheLoadControl CacheLoadControlAttribute = (QNetworkRequest::CacheLoadControl)request().attribute(QNetworkRequest::CacheLoadControlAttribute, QNetworkRequest::PreferNetwork).toInt(); if (CacheLoadControlAttribute == QNetworkRequest::AlwaysNetwork) { - // forced reload from the network - // tell any caching proxy servers to reload too - httpRequest.setHeaderField("Cache-Control", "no-cache"); - httpRequest.setHeaderField("Pragma", "no-cache"); + // If the request does not already specify preferred cache-control + // force reload from the network and tell any caching proxy servers to reload too + if (!request().rawHeaderList().contains("Cache-Control")) { + httpRequest.setHeaderField("Cache-Control", "no-cache"); + httpRequest.setHeaderField("Pragma", "no-cache"); + } return; } |