summaryrefslogtreecommitdiff
path: root/methods
diff options
context:
space:
mode:
Diffstat (limited to 'methods')
-rw-r--r--methods/gzip.cc1
-rw-r--r--methods/http.cc2
2 files changed, 2 insertions, 1 deletions
diff --git a/methods/gzip.cc b/methods/gzip.cc
index 809afc0fc..55ff33270 100644
--- a/methods/gzip.cc
+++ b/methods/gzip.cc
@@ -111,6 +111,7 @@ bool GzipMethod::Fetch(FetchItem *Itm)
if (To.Write(Buffer,Count) == false)
{
Failed = true;
+ FromGz.Close();
break;
}
}
diff --git a/methods/http.cc b/methods/http.cc
index cb63ada49..1f3b038bc 100644
--- a/methods/http.cc
+++ b/methods/http.cc
@@ -656,7 +656,7 @@ void HttpMethod::SendReq(FetchItem *Itm,CircleBuf &Out)
will glitch HTTP/1.0 proxies because they do not filter it out and
pass it on, HTTP/1.1 says the connection should default to keep alive
and we expect the proxy to do this */
- if (Proxy.empty() == true)
+ if (Proxy.empty() == true || Proxy.Host.empty())
sprintf(Buf,"GET %s HTTP/1.1\r\nHost: %s\r\nConnection: keep-alive\r\n",
QuoteString(Uri.Path,"~").c_str(),ProperHost.c_str());
else