summaryrefslogtreecommitdiffstats
path: root/src/network/access/qhttpnetworkconnection.cpp
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2009-10-01 12:21:19 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2009-10-01 12:21:19 (GMT)
commitf52092927ac8c55f0c81fe218499995fd2478f27 (patch)
tree6e825acf1346cafa9e6c02296accdab7a6378bde /src/network/access/qhttpnetworkconnection.cpp
parent6f0b674c9c46ff76a4ee8daa61402c6ded849d69 (diff)
parentce7cf03ab1346b5f447db3d849d2c183abce0138 (diff)
downloadQt-f52092927ac8c55f0c81fe218499995fd2478f27.zip
Qt-f52092927ac8c55f0c81fe218499995fd2478f27.tar.gz
Qt-f52092927ac8c55f0c81fe218499995fd2478f27.tar.bz2
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt into 4.5
Diffstat (limited to 'src/network/access/qhttpnetworkconnection.cpp')
-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 4fcbc1f..aef1258 100644
--- a/src/network/access/qhttpnetworkconnection.cpp
+++ b/src/network/access/qhttpnetworkconnection.cpp
@@ -244,6 +244,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())