Please provide a way to prevent If-Range header use

Bug #983128 reported by Soren Hansen
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt-cacher-ng (Ubuntu)
Fix Released
Undecided
Unassigned
Precise
Fix Released
Undecided
Unassigned

Bug Description

SRU justification: See bug 1162876.

Original report follows:

I'm stuck behind a proxy that seems to filter the if-range header from requests from apt-cacher-ng.

This means that when apt-cacher-ng tries to refresh a volatile file by passing "If-Range: <last known modification time" and "Range: bytes=<last byte of the file>", all the remote server ever sees is the request for the last byte. apt-cacher-ng gets a HTTP 206 response back and concludes that the file hasn't changed.

This causes lots of grief because the Release file isn't updated, so the trust path from Release.gpg -> Release -> Packages.bz2 -> checksums of packages is busted.

I see this comment in apt-0.8.16~exp12ubuntu8/apt-pkg/acquire-item.cc:

      // File was already in place. It needs to be re-downloaded/verified
      // because Release might have changed, we do give it a differnt
      // name than DestFile because otherwise the http method will
      // send If-Range requests and there are too many broken servers
      // out there that do not understand them

..suggesting that I'm far from alone with this problem.

Revision history for this message
Eduard Bloch (edi-gmx) wrote :

Maybe not so far as you think, it's the first report of such kind (in almost five years).

IMHO not supporting If-Range correctly is an utterly stupid idea. It's like replacing red light bulbs with green ones in traffic lights and say: hey, it's good enough, it will be correct most of the time.

I will provide that option ASAP.

Revision history for this message
Soren Hansen (soren) wrote : Re: [Bug 983128] Re: Please provide a way to prevent If-Range header use

16. apr. 2012 18.25 skrev Eduard Bloch <email address hidden>:
> Maybe not so far as you think, it's the first report of such kind (in
> almost five years).

Wow.

> IMHO not supporting If-Range correctly is an utterly stupid idea.

It is. I'm in the process of reporting the bug to the proxy vendor,
but it's a bit of a convoluted process.

> I will provide that option ASAP.

*Fantastic*. Thank you!

--
Soren Hansen             | http://linux2go.dk/
Senior Software Engineer | http://www.cisco.com/
Ubuntu Developer         | http://www.ubuntu.com/
OpenStack Developer      | http://www.openstack.org/

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apt-cacher-ng - 0.7.4-1ubuntu1

---------------
apt-cacher-ng (0.7.4-1ubuntu1) quantal; urgency=low

  * Merge from Debian unstable. Remaining changes:
    - debian/apt-cacher-ng.logrotate:
      Comment out the "su" lines as this requires logrotate 3.8.1 which isn't
      in Ubuntu yet.
    - drop conflict on logrotate < 3.8.1

apt-cacher-ng (0.7.4-1) unstable; urgency=medium

  * New upstream release
    + prevents endless looping in certain situations (LP: #999915)
    + more tolerance to unstable connections and behavior fix for conflicting
      downloads in maintenance mode (closes: #672801)
  * added a bug-script to present some instructions

apt-cacher-ng (0.7.3-1) unstable; urgency=low

  * New upstream release
    + Fixes FTBFS (missing unistd.h include, closes: #667100)
    + option to disable Range/If-Range for volatile files (LP: #983128)
    + Fixes storage of HTTP header data in cached files under certain
      circumstances (now really closes: #644959)
  * Conflict with older logrotate not understanding "su" (closes: #662760)
  * Process user/group is configurable via default file now (closes: #668421)
 -- Julian Taylor <email address hidden> Fri, 25 May 2012 23:41:35 +0200

Changed in apt-cacher-ng (Ubuntu):
status: New → Fix Released
Colin Watson (cjwatson)
description: updated
Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Soren, or anyone else affected,

Accepted apt-cacher-ng into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/apt-cacher-ng/0.7.2-1ubuntu2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in apt-cacher-ng (Ubuntu Precise):
status: New → Fix Committed
tags: added: verification-needed
Jonathan Davies (jpds)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Colin Watson (cjwatson) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apt-cacher-ng - 0.7.2-1ubuntu2

---------------
apt-cacher-ng (0.7.2-1ubuntu2) precise; urgency=low

   [ Eduard Bloch ]
   * Option to disable Range/If-Range for volatile files (LP: #983128)
   * Fixes storage of HTTP header data in cached files under certain
         circumstances (now really closes: #644959) (LP: #1162876)
 -- Chris J Arges <email address hidden> Tue, 09 Apr 2013 00:21:04 +0100

Changed in apt-cacher-ng (Ubuntu Precise):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.