Re: Bug#152711: apt: chunked encoding bug
On 10 Dec 2003, Andrew M. Bishop wrote:
> There is a ^M character at the start of the chunk. This does not
> happen in the works/localhost:8080.r1.dat file because the chunk is
> one byte longer so you get:
Oh blah. No wonder this is so hard to reproduce.
The problem is this little bit:
do
{
if (In.WriteTillEl(Data,true) == true)
break;
}
while ((Last = Owner->Go(false,this)) == true);
Which reads the chunk length, but 'WriteTillEl' gobbles the extra ^M.
It should work if you make the inner for loop in WriteTillEl an if
statement so it doesn't gobble.
Hopefully Matt can fix this now :>
Jason
Reply to: