[MERGE][bug #120697] Don't force http cache revalidation
John Arbash Meinel
john at arbash-meinel.com
Tue Nov 20 20:05:42 GMT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Vincent Ladeuil wrote:
> Since rev 1616.1.11:
>
> bzr log -r 1616.1.11 -v
> ------------------------------------------------------------
> revno: 1616.1.11
> committer: Martin Pool <mbp at sourcefrog.net>
> branch nick: bzr.mbp.integration
> timestamp: Wed 2006-03-22 12:44:32 +0000
> message:
> Add Pragma and Cache-control headers to urllib requests
> modified:
> bzrlib/transport/http/_urllib.py
>
> bzr diff -c 1616.1.11
> === modified file 'bzrlib/transport/http/_urllib.py'
> --- bzrlib/transport/http/_urllib.py 2006-03-10 07:37:52 +0000
> +++ bzrlib/transport/http/_urllib.py 2006-03-22 12:44:32 +0000
> @@ -83,6 +83,8 @@
> opener = urllib2.build_opener(auth_handler)
> request = Request(url)
> request.method = method
> + request.add_header('Pragma', 'no-cache')
> + request.add_header('Cache-control', 'max-age=0')
> request.add_header('User-Agent', 'bzr/%s (urllib)' % bzrlib.__version__)
> if ranges:
> assert len(ranges) == 1
>
> We force the proxy cache to revalidate every file when using http
> transports.
>
> The attached patch revert that behaviour for both urllib and
> pycurl http implementations.
>
> I can't imagine why it is still needed (neither why it was)
> except if someone encoutered a bug without that feature.
>
> Martin, since you introduced that change, can you shed some light
> on why you did so ?
>
> Vincent
>
>
We were having people try to update from a branch, but their proxy in the
middle was caching .bzr/branch/revision_history (now last_revision). Which
meant that it looked like there was no new updates.
I don't know if that is just a sign of a bad proxy. But that was at least the
motivation at the time.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHQz4WJdeBCYSNAAMRAioJAKCTLgq1RiQXuOrrvsJhmN8UJjE7PgCcCX8N
WHgfCAkUJ1vVO+eS8kXT2OQ=
=rhc4
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list