]> dgit.raspbian.org Git - nextcloud-desktop.git/commit
Always follow redirects in network jobs (#4905)
authorDaniel Molkentin <daniel@molkentin.de>
Tue, 9 Aug 2016 14:01:29 +0000 (16:01 +0200)
committerGitHub <noreply@github.com>
Tue, 9 Aug 2016 14:01:29 +0000 (16:01 +0200)
commitbb5c2cbfa571e0d557853fec8d548f4b6d53a698
treeee5fff9e46c833475ccfc297af0444995850d53a
parent60904496d28ce6b7d87b6d039c8d47ca00d3a531
Always follow redirects in network jobs (#4905)

This is a move away from the original policy where jobs
would only follow redirects in special cases.

Two restrictions are in place:

1. We do not allow protocol downgrades (https -> http)
2. We stop redirects after we find them looping (e.g. old = new url, or
indirectly when looping 10 times).

This is closer to RFC conforming behavior, although currently
we will treat 301 replies like they were 302. This is for a separate
commit.

Error handling (and display) also needs improvement.

Addresses #2791
src/libsync/abstractnetworkjob.cpp
src/libsync/networkjobs.cpp
src/libsync/propagatedownload.cpp