diff options
author | Liang Qi <liang.qi@qt.io> | 2017-10-15 21:05:08 +0200 |
---|---|---|
committer | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2017-10-16 22:21:52 +0300 |
commit | 01afc8c810201b93a12fe7030344e03566d99001 (patch) | |
tree | 27727b38370209dc158856b4bb4d32ccd2e49fbe /src/network/access | |
parent | a090076e93487f8e461d9b866b9da1c0c21cb59b (diff) | |
parent | 49da5ce10034161017b261e000d4e9063d962401 (diff) |
Merge remote-tracking branch 'origin/5.9' into 5.10
Change-Id: I3cf73c53cf131d0babfb558c2507bed0e0fc5f08
Diffstat (limited to 'src/network/access')
-rw-r--r-- | src/network/access/qhttpnetworkconnectionchannel.cpp | 3 | ||||
-rw-r--r-- | src/network/access/qhttpnetworkreply.cpp | 2 | ||||
-rw-r--r-- | src/network/access/qnetworkreply.cpp | 2 | ||||
-rw-r--r-- | src/network/access/qnetworkreplyhttpimpl.cpp | 1 |
4 files changed, 5 insertions, 3 deletions
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index b1ae29427e..52dd86cd1e 100644 --- a/src/network/access/qhttpnetworkconnectionchannel.cpp +++ b/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -600,7 +600,8 @@ void QHttpNetworkConnectionChannel::handleStatus() case 302: case 303: case 305: - case 307: { + case 307: + case 308: { // Parse the response headers and get the "location" url QUrl redirectUrl = connection->d_func()->parseRedirectResponse(socket, reply); if (redirectUrl.isValid()) diff --git a/src/network/access/qhttpnetworkreply.cpp b/src/network/access/qhttpnetworkreply.cpp index 612abb9044..778ba821e8 100644 --- a/src/network/access/qhttpnetworkreply.cpp +++ b/src/network/access/qhttpnetworkreply.cpp @@ -96,7 +96,7 @@ void QHttpNetworkReply::setRedirectUrl(const QUrl &url) bool QHttpNetworkReply::isHttpRedirect(int statusCode) { return (statusCode == 301 || statusCode == 302 || statusCode == 303 - || statusCode == 305 || statusCode == 307); + || statusCode == 305 || statusCode == 307 || statusCode == 308); } qint64 QHttpNetworkReply::contentLength() const diff --git a/src/network/access/qnetworkreply.cpp b/src/network/access/qnetworkreply.cpp index cabea86521..11d8f0e3f7 100644 --- a/src/network/access/qnetworkreply.cpp +++ b/src/network/access/qnetworkreply.cpp @@ -297,7 +297,7 @@ QNetworkReplyPrivate::QNetworkReplyPrivate() This signal is emitted if the QNetworkRequest::FollowRedirectsAttribute was set in the request and the server responded with a 3xx status (specifically - 301, 302, 303, 305 or 307 status code) with a valid url in the location + 301, 302, 303, 305, 307 or 308 status code) with a valid url in the location header, indicating a HTTP redirect. The \a url parameter contains the new redirect url as returned by the server in the location header. diff --git a/src/network/access/qnetworkreplyhttpimpl.cpp b/src/network/access/qnetworkreplyhttpimpl.cpp index 48255d175a..c1575bc812 100644 --- a/src/network/access/qnetworkreplyhttpimpl.cpp +++ b/src/network/access/qnetworkreplyhttpimpl.cpp @@ -1204,6 +1204,7 @@ void QNetworkReplyHttpImplPrivate::checkForRedirect(const int statusCode) case 302: // Found case 303: // See Other case 307: // Temporary Redirect + case 308: // Permanent Redirect // What do we do about the caching of the HTML note? // The response to a 303 MUST NOT be cached, while the response to // all of the others is cacheable if the headers indicate it to be |