summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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())