summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2009-10-01 16:10:22 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2009-10-01 16:10:22 (GMT)
commit30d9101ecabeb0778c829c3578f1fcf5ec276a8c (patch)
treed6d67506c2bae71bf967845ff503e02dd41372ae /src/network
parent6ee282013b82b5f46fa972296b801eab55c614c1 (diff)
parent984fe9ebfc6d9582d21bcf1d09cb0578fd163f54 (diff)
downloadQt-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.cpp9
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())