]> git.saurik.com Git - apt.git/blobdiff - methods/http.cc
Add ldconfig to postinst script under configure argument
[apt.git] / methods / http.cc
index dc0c6d8916597249130ad6baf10bcd56ec67fd5e..79d35f65ffa1f3e95dd34c1cc947449f5c506394 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: http.cc,v 1.18 1998/12/30 02:28:29 jgg Exp $
+// $Id: http.cc,v 1.22 1999/01/20 04:36:43 jgg Exp $
 /* ######################################################################
 
    HTTP Aquire Method - This is the HTTP aquire method for APT.
@@ -346,7 +346,7 @@ bool ServerState::Open()
       return _error->Errno("select","Select failed");
    if (Res == 0)
       return _error->Error("Could not connect, connection timed out");
-   unsigned int Err,Len;
+   unsigned int Err,Len=sizeof(Err);
    if (getsockopt(ServerFd,SOL_SOCKET,SO_ERROR,&Err,&Len) != 0)
       return _error->Errno("getsockopt","Failed");
    if (Err != 0)
@@ -616,7 +616,7 @@ void HttpMethod::SendReq(FetchItem *Itm,CircleBuf &Out)
       and we expect the proxy to do this */
    if (Proxy.empty() == true)
       sprintf(Buf,"GET %s HTTP/1.1\r\nHost: %s\r\nConnection: keep-alive\r\n",
-             Uri.Path.c_str(),ProperHost.c_str());
+             QuoteString(Uri.Path,"~").c_str(),ProperHost.c_str());
    else
    {
       /* Generate a cache control header if necessary. We place a max
@@ -875,6 +875,7 @@ int HttpMethod::DealWithHeaders(FetchResult &Res,ServerState *Srv)
       return 5;
 
    FailFile = Queue->DestFile;
+   FailFile.c_str();   // Make sure we don't do a malloc in the signal handler
    FailFd = File->Fd();
    FailTime = Srv->Date;