summaryrefslogtreecommitdiff
path: root/src/network/access/qnetworkreply.cpp
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2022-05-03 11:27:20 +0200
committerFlorian Bruhin <me@the-compiler.org>2022-05-04 15:20:35 +0200
commitfcc64a57cf6995046be83e93cb1c466b27f51917 (patch)
treeb979a9bc1ef48c4930f2301e8b840b50f0bf66c2 /src/network/access/qnetworkreply.cpp
parent9bd4e0fe136847247407a64f3f73b66a77881181 (diff)
downloadqtbase-fcc64a57cf6995046be83e93cb1c466b27f51917.tar.gz
Fix documentation for QNetworkReply::redirected
In d12afeff4097dd78f1311511e0c8f74e1a810d47, the default redirect policy was changed to NoLessSafeRedirectPolicy (from ManualRedirectPolicy), and this was reworded from: This signal is emitted if the QNetworkRequest::FollowRedirectsAttribute was set in the request [...] (i.e.: Qt handles redirect, no manual handling) to: This signal is emitted if the QNetworkRequest::ManualRedirectPolicy was set in the request [...] (i.e.: User handles redirect, no handling by Qt), which is exactly the wrong way around. Only if Qt handles the redirect, it's able to send a signal about it. If the user handles redirects, they would get the RedirectionTargetAttribute in response to the finished() signal. Also see tst_QNetworkReply::ioHttpSingleRedirect(): It sets NoLessSafeRedirectPolicy (default since Qt 6) and then ensures the "redirected" signal has been emitted. Pick-to: 6.3 6.2 Change-Id: I7e80ff69b94a4d94eb541b1021b05601d183c733 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/network/access/qnetworkreply.cpp')
-rw-r--r--src/network/access/qnetworkreply.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/access/qnetworkreply.cpp b/src/network/access/qnetworkreply.cpp
index 7e60374dd7..1956a9a7b3 100644
--- a/src/network/access/qnetworkreply.cpp
+++ b/src/network/access/qnetworkreply.cpp
@@ -300,7 +300,7 @@ QNetworkReplyPrivate::QNetworkReplyPrivate()
\fn void QNetworkReply::redirected(const QUrl &url)
\since 5.6
- This signal is emitted if the QNetworkRequest::ManualRedirectPolicy was
+ This signal is emitted if the QNetworkRequest::ManualRedirectPolicy was not
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