summaryrefslogtreecommitdiff
path: root/methods/http.cc
diff options
context:
space:
mode:
Diffstat (limited to 'methods/http.cc')
-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 */
}