summaryrefslogtreecommitdiff
path: root/methods
diff options
context:
space:
mode:
authorRaphael Geissert <geissert@debian.org>2012-05-14 18:07:01 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2012-05-14 18:07:01 +0200
commit5674f6b3163d73260e25ce7d350aaac50071eb0e (patch)
tree539d9e9018b7c0f4c3572c612a6cee23c28abb84 /methods
parente1284a59de37efeedcc998ef61e8466c35b82eb2 (diff)
* apt-pkg/acquire*.cc:
- handle redirections in the worker with the right method instead of in the method the redirection occured in (Closes: #668111) * methods/http.cc: - forbid redirects to change protocol
Diffstat (limited to 'methods')
-rw-r--r--methods/http.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/methods/http.cc b/methods/http.cc
index b450b6ffc..bb02176e9 100644
--- a/methods/http.cc
+++ b/methods/http.cc
@@ -985,7 +985,10 @@ HttpMethod::DealWithHeaders(FetchResult &Res,ServerState *Srv)
else
{
NextURI = DeQuoteString(Srv->Location);
- return TRY_AGAIN_OR_REDIRECT;
+ URI tmpURI = NextURI;
+ // Do not allow a redirection to switch protocol
+ if (tmpURI.Access == "http")
+ return TRY_AGAIN_OR_REDIRECT;
}
/* else pass through for error message */
}