summaryrefslogtreecommitdiff
path: root/methods
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 17:06:45 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 17:06:45 +0000
commit2cbcabd888a1ae24091db36df6cdf5fa66e3c341 (patch)
tree09de250029074de1d1972dea6f97070c5a09623d /methods
parentcb8f6c76467c8a2aaa757b9e4fa5f238acc40619 (diff)
* Attempt to fix problems with chunked encoding by stri...
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)
Diffstat (limited to 'methods')
-rw-r--r--methods/http.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/methods/http.cc b/methods/http.cc
index 365d172db..3bb29cde0 100644
--- a/methods/http.cc
+++ b/methods/http.cc
@@ -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)