summaryrefslogtreecommitdiffstats
path: root/src/network/access
diff options
context:
space:
mode:
authorDavid Faure <david.faure@kdab.com>2016-03-27 22:32:19 +0200
committerDavid Faure <david.faure@kdab.com>2016-04-10 07:37:58 +0000
commit8686ff0d9c09af255a16d03a1f5a2f794c631424 (patch)
treedcd557ae64af9b4081a4dfe2d67dc08a2c6be601 /src/network/access
parentb6eea89b67e0d3bb4f8f888fff21257eff0b65a5 (diff)
Doc: clarify redirection handling in QNetworkRequest
The text for RedirectionTargetAttribute said the app has to handle redirections, and only said that this attribute wouldn't be set if FollowRedirectsAttribute is set, which was a bit confusing to read, before reading what exactly FollowRedirectsAttribute does. It does more than removing the other attribute, it actually follows the redirection... Change-Id: Idc634996e7b521ba05c05ca52438e47f1a411c85 Reviewed-by: Mandeep Sandhu <mandeepsandhu.chd@gmail.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'src/network/access')
-rw-r--r--src/network/access/qnetworkrequest.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp
index 2a62cb5f39..29a7c2c46d 100644
--- a/src/network/access/qnetworkrequest.cpp
+++ b/src/network/access/qnetworkrequest.cpp
@@ -138,11 +138,12 @@ QT_BEGIN_NAMESPACE
Replies only, type: QMetaType::QUrl (no default)
If present, it indicates that the server is redirecting the
request to a different URL. The Network Access API does not by
- default follow redirections: it's up to the application to
+ default follow redirections: the application can
determine if the requested redirection should be allowed,
- according to its security policies. However, if
- QNetworkRequest::FollowRedirectsAttribute is set, then this attribute
- will not be present in the reply.
+ according to its security policies, or it can set
+ QNetworkRequest::FollowRedirectsAttribute to true (in which case
+ the redirection will be followed and this attribute will not
+ be present in the reply).
The returned URL might be relative. Use QUrl::resolved()
to create an absolute URL out of it.