summaryrefslogtreecommitdiff
path: root/methods/http.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2012-05-21 11:29:05 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2012-05-21 11:29:05 +0200
commit6c1f5d2c3c8df164e78dda8f24d28667634403e1 (patch)
treed711a52cf5a92a13b87f248307f5521846a7dbcf /methods/http.cc
parentaa2218b25cb29e8c0677f0f3ede098583c7ae49f (diff)
parent0baf849d81814fce59d86eecccbe624c8aaf0456 (diff)
merged from David, uncommited the previous i18n commit first as its part of the merge from David already but for some reason bzr is confused and gives a gazillion of conflicts in doc/po/de.po without the uncommit first
Diffstat (limited to 'methods/http.cc')
-rw-r--r--methods/http.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/methods/http.cc b/methods/http.cc
index b450b6ffc..acf25a42a 100644
--- a/methods/http.cc
+++ b/methods/http.cc
@@ -61,7 +61,7 @@ using namespace std;
string HttpMethod::FailFile;
int HttpMethod::FailFd = -1;
time_t HttpMethod::FailTime = 0;
-unsigned long PipelineDepth = 10;
+unsigned long PipelineDepth = 0;
unsigned long TimeOut = 120;
bool AllowRedirect = false;
bool Debug = false;
@@ -758,7 +758,7 @@ void HttpMethod::SendReq(FetchItem *Itm,CircleBuf &Out)
Base64Encode(Uri.User + ":" + Uri.Password) + "\r\n";
}
Req += "User-Agent: " + _config->Find("Acquire::http::User-Agent",
- "Debian APT-HTTP/1.3 ("PACKAGE_VERSION")") + "\r\n\r\n";
+ "Debian APT-HTTP/1.3 (" PACKAGE_VERSION ")") + "\r\n\r\n";
if (Debug == true)
cerr << Req << endl;
@@ -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 */
}