Author: jgg
Date: 2000-05-12 05:04:57 GMT
Fixed error reporting for empty host strings and invalid proxy settings
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: connect.cc,v 1.4 1999/11/19 05:01:54 jgg Exp $
+// $Id: connect.cc,v 1.5 2000/05/12 05:04:57 jgg Exp $
/* ######################################################################
Connect - Replacement connect call
_error->Discard();
}
- return false;
+ if (_error->PendingError() == true)
+ return false;
+ return _error->Error("Unable to connect to '%s'",Host.c_str());
}
/*}}}*/
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: http.cc,v 1.44 2000/01/30 08:16:43 jgg Exp $
+// $Id: http.cc,v 1.45 2000/05/12 05:04:57 jgg Exp $
/* ######################################################################
HTTP Aquire Method - This is the HTTP aquire method for APT.
break;
}
}
-
+
// Determine what host and port to use based on the proxy settings
int Port = 0;
string Host;
- if (Proxy.empty() == true)
+ if (Proxy.empty() == true || Proxy.Host.empty() == true)
{
if (ServerName.Port != 0)
Port = ServerName.Port;