diff options
author | Christian Perrier <bubulle@debian.org> | 2006-01-20 12:51:36 +0000 |
---|---|---|
committer | Christian Perrier <bubulle@debian.org> | 2006-01-20 12:51:36 +0000 |
commit | dbe5505ecb4180bc3d850193aa2458bd04df1896 (patch) | |
tree | 5739bcf32d2c7bee58bc235f97c894bc157c501f /methods/http.cc | |
parent | 9b7f38f18c97808022f15ce496479c94126bd169 (diff) | |
parent | 011d9176844e1817f1dc64cf61c375ab77646d0e (diff) |
Resync with Michael
Patches applied:
* michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-116
* changelog updates
* michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-117
* merged with bubulle
* michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-118
* merged from bubulle
* michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-119
* fix http data corruption (#280844)
* michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-120
* added debian-archive-keyring to recommends
* michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-121
* merged with bubulle
* michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-122
* fix apt-key to ask for the correct package
* michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-123
* fix typo in apt-cache.8 manpage
* michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-124
* fixed another typo in doc/apt-secure.8.xml
* michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-125
* merged the debian-sid changes back
* michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-126
* fixed the changelog yet again
* mvo@debian.org--2005/apt--debian-experimental--0--patch-12
* added http data corruption fix patch (#280844)
* mvo@debian.org--2005/apt--debian-sid--0--patch-17
* merged with apt--mvo--0
* mvo@debian.org--2005/apt--debian-sid--0--patch-18
* merged with apt--mvo
Diffstat (limited to 'methods/http.cc')
-rw-r--r-- | methods/http.cc | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/methods/http.cc b/methods/http.cc index dc3f0b763..341de94e3 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -241,28 +241,23 @@ bool CircleBuf::WriteTillEl(string &Data,bool Single) if (Buf[I%Size] != '\n') continue; ++I; - if (I < InP && Buf[I%Size] == '\r') - ++I; if (Single == false) { - if (Buf[I%Size] != '\n') - continue; - ++I; if (I < InP && Buf[I%Size] == '\r') ++I; + if (I >= InP || Buf[I%Size] != '\n') + continue; + ++I; } - if (I > InP) - I = InP; - Data = ""; while (OutP < I) { unsigned long Sz = LeftWrite(); if (Sz == 0) return false; - if (I - OutP < LeftWrite()) + if (I - OutP < Sz) Sz = I - OutP; Data += string((char *)(Buf + (OutP%Size)),Sz); OutP += Sz; |