]> git.saurik.com Git - apt.git/blobdiff - methods/http.cc
Merge from CVS
[apt.git] / methods / http.cc
index a5af2891763d6181fe10ce90bafe73d2a78c44ac..3bb29cde07d7c42d1658a01c2fe66d4d28617125 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: http.cc,v 1.57 2004/01/07 20:39:38 mdz Exp $
+// $Id: http.cc,v 1.59 2004/05/08 19:42:35 mdz Exp $
 /* ######################################################################
 
    HTTP Aquire Method - This is the HTTP aquire method for APT.
@@ -203,13 +203,17 @@ bool CircleBuf::WriteTillEl(string &Data,bool Single)
    {      
       if (Buf[I%Size] != '\n')
         continue;
-      for (I++; I < InP && Buf[I%Size] == '\r'; I++);
+      ++I;
+      if (I < InP  && Buf[I%Size] == '\r')
+         ++I;
       
       if (Single == false)
       {
         if (Buf[I%Size] != '\n')
            continue;
-        for (I++; I < InP && Buf[I%Size] == '\r'; I++);
+         ++I;
+         if (I < InP  && Buf[I%Size] == '\r')
+            ++I;
       }
       
       if (I > InP)
@@ -637,7 +641,7 @@ void HttpMethod::SendReq(FetchItem *Itm,CircleBuf &Out)
       {
         if (Itm->IndexFile == true)
            sprintf(Buf+strlen(Buf),"Cache-Control: max-age=%u\r\n",
-                   _config->FindI("Acquire::http::Max-Age",60*60*24));
+                   _config->FindI("Acquire::http::Max-Age",0));
         else
         {
            if (_config->FindB("Acquire::http::No-Store",false) == true)