summaryrefslogtreecommitdiff
path: root/methods/basehttp.cc
diff options
context:
space:
mode:
Diffstat (limited to 'methods/basehttp.cc')
-rw-r--r--methods/basehttp.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/methods/basehttp.cc b/methods/basehttp.cc
index f8dd7c020..04c194ad9 100644
--- a/methods/basehttp.cc
+++ b/methods/basehttp.cc
@@ -313,7 +313,7 @@ BaseHttpMethod::DealWithHeaders(FetchResult &Res, RequestState &Req)
;
else if (Req.Location[0] == '/' && Queue->Uri.empty() == false)
{
- URI Uri = Queue->Uri;
+ URI Uri(Queue->Uri);
if (Uri.Host.empty() == false)
NextURI = URI::SiteOnly(Uri);
else
@@ -332,7 +332,7 @@ BaseHttpMethod::DealWithHeaders(FetchResult &Res, RequestState &Req)
else
{
NextURI = DeQuoteString(Req.Location);
- URI tmpURI = NextURI;
+ URI tmpURI(NextURI);
if (tmpURI.Access.find('+') != std::string::npos)
{
_error->Error("Server tried to trick us into using a specific implementation: %s", tmpURI.Access.c_str());
@@ -340,7 +340,7 @@ BaseHttpMethod::DealWithHeaders(FetchResult &Res, RequestState &Req)
return ERROR_WITH_CONTENT_PAGE;
return ERROR_UNRECOVERABLE;
}
- URI Uri = Queue->Uri;
+ URI Uri(Queue->Uri);
if (Binary.find('+') != std::string::npos)
{
auto base = Binary.substr(0, Binary.find('+'));
@@ -493,7 +493,7 @@ bool BaseHttpMethod::Fetch(FetchItem *)
do {
// Make sure we stick with the same server
- if (Server->Comp(QueueBack->Uri) == false)
+ if (Server->Comp(URI(QueueBack->Uri)) == false)
break;
bool const UsableHashes = QueueBack->ExpectedHashes.usable();
@@ -578,14 +578,14 @@ int BaseHttpMethod::Loop()
continue;
// Connect to the server
- if (Server == 0 || Server->Comp(Queue->Uri) == false)
+ if (Server == 0 || Server->Comp(URI(Queue->Uri)) == false)
{
if (!Queue->Proxy().empty())
{
- URI uri = Queue->Uri;
+ URI uri(Queue->Uri);
_config->Set("Acquire::" + uri.Access + "::proxy::" + uri.Host, Queue->Proxy());
}
- Server = CreateServerState(Queue->Uri);
+ Server = CreateServerState(URI(Queue->Uri));
setPostfixForMethodNames(::URI(Queue->Uri).Host.c_str());
AllowRedirect = ConfigFindB("AllowRedirect", true);
PipelineDepth = ConfigFindI("Pipeline-Depth", 10);