diff options
| author | Frederik Gladhorn <frederik.gladhorn@qt.io> | 2019-09-07 15:51:34 +0200 |
|---|---|---|
| committer | MÃ¥rten Nordheim <marten.nordheim@qt.io> | 2020-08-13 19:58:19 +0200 |
| commit | d12afeff4097dd78f1311511e0c8f74e1a810d47 (patch) | |
| tree | b41eaa0cc15ff19faf2a6a6e9e0f4e2b43c16abb /src/network/access/qnetworkreply.cpp | |
| parent | 09e22c6c3280d4187b1ed2d979ceea478b7bed75 (diff) | |
Set default redirect policy to NoLessSafeRedirectPolicy
Not following redirects is not a feature, but just a hastle for everyone.
The main issue with switching this default is that applications that
actually do manual redirect handling will break in various ways.
FollowRedirectsAttribute was removed as it no longer serves any
purpose beyond duplicating the default value.
[ChangeLog][Network] QNetworkAccessManager now follows redirects by
default with the NoLessSafeRedirectPolicy.
[ChangeLog][Potentially Source-Incompatible Changes]
QNetworkRequest::FollowRedirectsAttribute was removed and has been
superseded by QNetworkRequest::RedirectsPolicyAttribute
Fixes: QTBUG-85901
Change-Id: Ic5b776180a4b84ac4fc895158bb5a66a3c91a042
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/network/access/qnetworkreply.cpp')
| -rw-r--r-- | src/network/access/qnetworkreply.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/network/access/qnetworkreply.cpp b/src/network/access/qnetworkreply.cpp index f09d7f98385..c69bcc951e0 100644 --- a/src/network/access/qnetworkreply.cpp +++ b/src/network/access/qnetworkreply.cpp @@ -298,13 +298,13 @@ QNetworkReplyPrivate::QNetworkReplyPrivate() \fn void QNetworkReply::redirected(const QUrl &url) \since 5.6 - This signal is emitted if the QNetworkRequest::FollowRedirectsAttribute was + This signal is emitted if the QNetworkRequest::ManualRedirectPolicy was set in the request and the server responded with a 3xx status (specifically 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. - \sa QNetworkRequest::FollowRedirectsAttribute + \sa QNetworkRequest::RedirectPolicy */ /*! @@ -596,10 +596,10 @@ bool QNetworkReply::isRunning() const /*! Returns the URL of the content downloaded or uploaded. Note that - the URL may be different from that of the original request. If the - QNetworkRequest::FollowRedirectsAttribute was set in the request, then this + the URL may be different from that of the original request. + If redirections were enabled in the request, then this function returns the current url that the network API is accessing, i.e the - url emitted in the QNetworkReply::redirected signal. + url of the resource the request got redirected to. \sa request(), setUrl(), QNetworkRequest::url(), redirected() */ |
