projects
/
nextcloud-desktop.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
78b082a
)
AbstractNetworkJob: Allow relative redirect
author
Christian Kamm
<mail@ckamm.de>
Fri, 15 Sep 2017 07:24:56 +0000
(09:24 +0200)
committer
Roeland Jago Douma
<roeland@famdouma.nl>
Thu, 5 Oct 2017 20:01:32 +0000
(22:01 +0200)
Previously all redirects were considered absolute.
src/libsync/abstractnetworkjob.cpp
patch
|
blob
|
history
diff --git
a/src/libsync/abstractnetworkjob.cpp
b/src/libsync/abstractnetworkjob.cpp
index de68182ef08deaeaab1f76a3612d6bd905ce0bd5..f5f4b9d6251bb415138f249deff1f22cb24ef0eb 100644
(file)
--- a/
src/libsync/abstractnetworkjob.cpp
+++ b/
src/libsync/abstractnetworkjob.cpp
@@
-173,6
+173,10
@@
void AbstractNetworkJob::slotFinished()
if (_followRedirects && !redirectUrl.isEmpty()) {
_redirectCount++;
+ // Redirects may be relative
+ if (redirectUrl.isRelative())
+ redirectUrl = requestedUrl.resolved(redirectUrl);
+
// For POST requests where the target url has query arguments, Qt automatically
// moves these arguments to the body if no explicit body is specified.
// This can cause problems with redirected requests, because the redirect url