From 8221431757c775ee875a061b184b5f6f2330f928 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 15 May 2012 00:12:21 +0200 Subject: [PATCH] * methods/http.cc: - after many years of pointless discussions disable http/1.1 pipelining by default as many webservers and proxies seem to be unable to conform to specification must's (rfc2616 section 8.1.2.2) (LP: #996151) --- debian/changelog | 4 ++++ doc/apt.conf.5.xml | 13 ++++++------- methods/http.cc | 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/debian/changelog b/debian/changelog index 88057d531..dd8ca72cd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,10 @@ apt (0.9.4) UNRELEASED; urgency=low [ David Kalnischkies ] + * methods/http.cc: + - after many years of pointless discussions disable http/1.1 pipelining + by default as many webservers and proxies seem to be unable to conform + to specification must's (rfc2616 section 8.1.2.2) (LP: #996151) * apt-pkg/pkgcachegen.cc: - make IsDuplicatedDescription static so that it is really private as we don't need a symbol for it as it is not in a header diff --git a/doc/apt.conf.5.xml b/doc/apt.conf.5.xml index c2220b1bf..2f95c1e52 100644 --- a/doc/apt.conf.5.xml +++ b/doc/apt.conf.5.xml @@ -340,13 +340,12 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";}; The option timeout sets the timeout timer used by the method, this applies to all things including connection timeout and data timeout. - One setting is provided to control the pipeline depth in cases where the - remote server is not RFC conforming or buggy (such as Squid 2.0.2). - Acquire::http::Pipeline-Depth can be a value from 0 to 5 - indicating how many outstanding requests APT should send. A value of - zero MUST be specified if the remote host does not properly linger - on TCP connections - otherwise data corruption will occur. Hosts which - require this are in violation of RFC 2068. + The setting Acquire::http::Pipeline-Depth can be used to + enabled HTTP pipeling (RFC 2616 section 8.1.2.2) which can be beneficial e.g. on + high-latency connections. It specifies how many requests are send in a pipeline. + Previous APT versions had a default of 10 for this setting, but the default value + is now 0 (= disabled) to avoid problems with the ever-growing amount of webservers + and proxies which choose to not conform to the HTTP/1.1 specification. The used bandwidth can be limited with Acquire::http::Dl-Limit which accepts integer values in kilobyte. The default value is 0 which deactivates diff --git a/methods/http.cc b/methods/http.cc index bb02176e9..c8e6f1b7b 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -61,7 +61,7 @@ using namespace std; string HttpMethod::FailFile; int HttpMethod::FailFd = -1; time_t HttpMethod::FailTime = 0; -unsigned long PipelineDepth = 10; +unsigned long PipelineDepth = 0; unsigned long TimeOut = 120; bool AllowRedirect = false; bool Debug = false; -- 2.45.2