summaryrefslogtreecommitdiff
path: root/methods/basehttp.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2019-04-30 15:54:36 +0000
committerJulian Andres Klode <jak@debian.org>2019-04-30 15:54:36 +0000
commite547a738922b434ae0bad32ead26a1a3c2095d1e (patch)
treeef6120b02fd07a1edac2c3be30a17a3141adfdc8 /methods/basehttp.cc
parent4fa03143eee3776e2fa8fbd59d3cbaea40be0871 (diff)
parentaf74a9e2d55d6a9532eb3fbb9b96c65b7ddc1e4d (diff)
Merge branch 'pu/explicit-constructors' into 'master'
Use explicit constructors See merge request apt-team/apt!61
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);