On Mon, 22 May 2000 [EMAIL PROTECTED] wrote: > This is the code that checks for the returned header from the server. There > is > no checking here if the server is HTTP/1.0 or HTTP/1.1. I think that you need > the following two lines before the return statement. > > if(Major==0 || (Major==1 && Minor==0)) > Encoding = Closes;
None of this is really necessary, the server will close the connection on its own if it really does not support pipelining. There is an HTTP/1.0 extension that does pipeline when there is a Connection: header present so this test is wrong. You are confused about what the Encoding variable does. It does not control how APT handles pipelining, it (as it says) controls how APT decodes the data (It is the transfer encoding). There are only 3 options, Chunked - Variable length data with sub-headers Stream - Valid content-length Closes - No valid content length, closed connection == finished transfer The only difference between Encoding=Stream and Encoding=Closes is that closes does not check the length of the response [ie, a short response will not be detected]. All of your patches are wrong. The correct encoding for most HTTP/1.0 responses with Content-Length headers is 'Stream'. > Having tried these modifications on an HTTP/1.0 proxy I have noticed a > much better performance. Previously about half of the requests to the > server were never made (checking the server logs). I think this is Whatever you are using for server/proxy is really busted then, it is not following HTTP/1.0, it is not a bug in APT's method. All your changes do is force APT to abort the connection once the first request is done This is *particularly* true if the result is corrupt files. Any HTTP/1.0 conformant server/proxy will not corrupt data when presented with pipelined requests. Jason

