]> git.saurik.com Git - apt.git/commitdiff
* Attempt to fix problems with chunked encoding by stri...
authorArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 17:06:45 +0000 (17:06 +0000)
committerArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 17:06:45 +0000 (17:06 +0000)
Author: mdz
Date: 2004-05-08 19:42:35 GMT
* Attempt to fix problems with chunked encoding by stripping only a single CR
(Closes: #152711)

debian/changelog
methods/http.cc

index 612dcb841e8d2873775cc986184408cdd5563c14..83772e106a89eecc582ae389c23524cd6dd4b3ff 100644 (file)
@@ -18,6 +18,9 @@ apt (0.5.25) unstable; urgency=low
     - Build-Depends: s/libdb2-dev/libdb4.2-dev/
     - Add AC_PREREQ(2.50) to configure.in
     - Use db_strerror(err) rather than GlobalError::Errno (which uses strerror)
+    - Add note to NEWS.Debian about upgrading old databases
+  * Attempt to fix problems with chunked encoding by stripping only a single CR
+    (Closes: #152711)
   * Translation updates:
     - Updated Swedish translation from Peter Karlsson  <peter@softwolves.pp.se>
       (Closes: #238943)
@@ -44,7 +47,7 @@ apt (0.5.25) unstable; urgency=low
     - Updated Danish translation from Claus Hindsgaul <claus_h@image.dk>
       (Closes: #247311)
 
- --
+ -- Matt Zimmerman <mdz@debian.org>  Sat,  8 May 2004 12:42:23 -0700
 
 apt (0.5.24) unstable; urgency=low
 
index 365d172db9163486a678baf761247c59c8c4af12..3bb29cde07d7c42d1658a01c2fe66d4d28617125 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: http.cc,v 1.58 2004/02/27 00:52:41 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)