diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2009-10-01 16:10:22 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2009-10-01 16:10:22 (GMT) |
commit | 30d9101ecabeb0778c829c3578f1fcf5ec276a8c (patch) | |
tree | d6d67506c2bae71bf967845ff503e02dd41372ae /src/network | |
parent | 6ee282013b82b5f46fa972296b801eab55c614c1 (diff) | |
parent | 984fe9ebfc6d9582d21bcf1d09cb0578fd163f54 (diff) | |
download | Qt-30d9101ecabeb0778c829c3578f1fcf5ec276a8c.zip Qt-30d9101ecabeb0778c829c3578f1fcf5ec276a8c.tar.gz Qt-30d9101ecabeb0778c829c3578f1fcf5ec276a8c.tar.bz2 |
Merge branch '4.5' of scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/access/qhttpnetworkconnection.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index 27c0ed4..1124337 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -191,6 +191,15 @@ void QHttpNetworkConnectionPrivate::prepareRequest(HttpMessagePair &messagePair) request.d->autoDecompress = false; #endif } + + // some websites mandate an accept-language header and fail + // if it is not sent. This is a problem with the website and + // not with us, but we work around this by setting a + // universal one always. + value = request.headerField("accept-language"); + if (value.isEmpty()) + request.setHeaderField("accept-language", "en,*"); + // set the User Agent value = request.headerField("user-agent"); if (value.isEmpty()) |