summaryrefslogtreecommitdiff
path: root/methods/http.cc
diff options
context:
space:
mode:
Diffstat (limited to 'methods/http.cc')
-rw-r--r--methods/http.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/methods/http.cc b/methods/http.cc
index a4d187189..bd866d321 100644
--- a/methods/http.cc
+++ b/methods/http.cc
@@ -349,7 +349,7 @@ static ResultState UnwrapHTTPConnect(std::string Host, int Port, URI Proxy, std:
Out.Read(Req.str());
// Writing from proxy
- while (Out.WriteSpace() > 0)
+ while (Out.WriteSpace())
{
if (WaitFd(Fd->Fd(), true, Timeout) == false)
{
@@ -363,7 +363,7 @@ static ResultState UnwrapHTTPConnect(std::string Host, int Port, URI Proxy, std:
}
}
- while (In.ReadSpace() > 0)
+ while (In.ReadSpace())
{
if (WaitFd(Fd->Fd(), false, Timeout) == false)
{
@@ -389,7 +389,7 @@ static ResultState UnwrapHTTPConnect(std::string Host, int Port, URI Proxy, std:
return ResultState::TRANSIENT_ERROR;
}
- if (In.WriteSpace() > 0)
+ if (In.WriteSpace())
{
// Maybe there is actual data already read, if so we need to buffer it
std::unique_ptr<HttpConnectFd> NewFd(new HttpConnectFd());
@@ -974,9 +974,10 @@ void HttpMethod::SendReq(FetchItem *Itm)
Req << "User-Agent: " << ConfigFind("User-Agent",
"Debian APT-HTTP/1.3 (" PACKAGE_VERSION ")") << "\r\n";
- auto const referer = ConfigFind("Referer", "");
- if (referer.empty() == false)
- Req << "Referer: " << referer << "\r\n";
+ // the famously typoed HTTP header field
+ auto const referrer = ConfigFind("Referer", "");
+ if (referrer.empty() == false)
+ Req << "Referer: " << referrer << "\r\n";
Req << "\r\n";