summaryrefslogtreecommitdiff
path: root/methods
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:53:58 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:53:58 +0000
commit8195ae461bbe065c5d81f0e95b7f834a2549db39 (patch)
treefb3f68eaa3061ad13eae1b6c3b6f4fb4b9a6d561 /methods
parent9978c7b013773c56aa942305cc0c92994e7ee879 (diff)
Fixed a minor http bug and a bug in -d
Author: jgg Date: 1999-06-05 07:30:18 GMT Fixed a minor http bug and a bug in -d
Diffstat (limited to 'methods')
-rw-r--r--methods/http.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/methods/http.cc b/methods/http.cc
index f014193a0..0a7f04a4f 100644
--- a/methods/http.cc
+++ b/methods/http.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: http.cc,v 1.34 1999/05/29 03:25:03 jgg Exp $
+// $Id: http.cc,v 1.35 1999/06/05 07:30:18 jgg Exp $
/* ######################################################################
HTTP Aquire Method - This is the HTTP aquire method for APT.
@@ -643,7 +643,8 @@ void HttpMethod::SendReq(FetchItem *Itm,CircleBuf &Out)
bool HttpMethod::Go(bool ToFile,ServerState *Srv)
{
// Server has closed the connection
- if (Srv->ServerFd == -1 && Srv->In.WriteSpace() == false)
+ if (Srv->ServerFd == -1 && (Srv->In.WriteSpace() == false ||
+ ToFile == false))
return false;
fd_set rfds,wfds,efds;
@@ -678,7 +679,7 @@ bool HttpMethod::Go(bool ToFile,ServerState *Srv)
int MaxFd = FileFD;
if (MaxFd < Srv->ServerFd)
MaxFd = Srv->ServerFd;
-
+
// Select
struct timeval tv;
tv.tv_sec = TimeOut;
@@ -1016,7 +1017,7 @@ int HttpMethod::Loop()
if (FailCounter >= 2)
{
- Fail("Connection timed out",true);
+ Fail("Connection failed",true);
FailCounter = 0;
}