[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#152711: apt has problems with chunked encoding or publicfile?



spectre683@flashmail.com> wrote:

> however, after looking into it, i found that apt seemed to be gobbling
> up carriage returns after reading the chunk-size.  so, in a situation
> where you have:
> 
> chunk-size CRLF chunk-data CRLF,
> 
> and chunk-data begins with a CR, apt will corrupt the data.
> 
> an examination of the source suggested that CircleBuf::WriteTillEl()
> will in fact potentially gobble up lots of CRs, and changing this
> behavior to strictly consume one CRLF pair (two when (Single == false))
> appears to have solved the problem for me.

I can verify that apt-get does have problems with chunked transfer
encoding.  Of the 15 Packages.gz files that I fetched through a proxy
that uses chunked encoding 3 of them failed to be uncompressed.  All
of these three, and only these three, had a CR as the first character
of the chunked data (I captured all of the data streams in each
direction).

Disabling the use of chunked encoding removes the problem.
Examination of the files that fail show that they do conform to the
requirements for chunked encoding (chunk-size is correct for
chunk-data, CRLF in correct places).

Since there is a patch available it would seem simple to apply this
and close this bug.

-- 
Andrew.
----------------------------------------------------------------------
Andrew M. Bishop                             amb@gedanken.demon.co.uk
                                      http://www.gedanken.demon.co.uk/



Reply to: