Rev 3008: Leave the proxy caches do their job (bug #120697). in file:///v/home/vila/src/bzr/bugs/120697/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Tue Nov 20 09:27:51 GMT 2007
At file:///v/home/vila/src/bzr/bugs/120697/
------------------------------------------------------------
revno: 3008
revision-id:v.ladeuil+lp at free.fr-20071120092749-3vgv8xos1c0k2czv
parent: pqm at pqm.ubuntu.com-20071119235416-b8dvkk17vngbf99s
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 120697
timestamp: Tue 2007-11-20 10:27:49 +0100
message:
Leave the proxy caches do their job (bug #120697).
* _pycurl.py:
(PyCurlTransport._curl_perform): Delete cache related headers.
* _urllib2_wrappers.py:
(AbstractHTTPHandler): Delete cache related headers.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/transport/http/_pycurl.py pycurlhttp.py-20060110060940-4e2a705911af77a6
bzrlib/transport/http/_urllib2_wrappers.py _urllib2_wrappers.py-20060913231729-ha9ugi48ktx481ao-1
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS 2007-11-17 18:07:42 +0000
+++ b/NEWS 2007-11-20 09:27:49 +0000
@@ -59,6 +59,9 @@
retrying an http request or some programming errors may be masked.
(Vincent Ladeuil, #160012)
+ * Don't force cache revalidation for http requests.
+ (Vincent Ladeuil, #120697)
+
* Fix multiple connections during checkout --lightweight.
(Vincent Ladeuil, #159150)
=== modified file 'bzrlib/transport/http/_pycurl.py'
--- a/bzrlib/transport/http/_pycurl.py 2007-10-31 12:38:11 +0000
+++ b/bzrlib/transport/http/_pycurl.py 2007-11-20 09:27:49 +0000
@@ -73,8 +73,6 @@
raise DependencyNotPresent('pycurl', e)
-
-
def _get_pycurl_errcode(symbol, default):
"""
Returns the numerical error code for a symbol defined by pycurl.
@@ -87,6 +85,7 @@
"""
return pycurl.__dict__.get(symbol, default)
+
CURLE_SSL_CACERT_BADFILE = _get_pycurl_errcode('E_SSL_CACERT_BADFILE', 77)
CURLE_COULDNT_CONNECT = _get_pycurl_errcode('E_COULDNT_CONNECT', 7)
CURLE_COULDNT_RESOLVE_HOST = _get_pycurl_errcode('E_COULDNT_RESOLVE_HOST', 6)
@@ -274,13 +273,7 @@
def _curl_perform(self, curl, header, more_headers=[]):
"""Perform curl operation and translate exceptions."""
try:
- # There's no way in http/1.0 to say "must
- # revalidate"; we don't want to force it to always
- # retrieve. so just turn off the default Pragma
- # provided by Curl.
- headers = ['Cache-control: max-age=0',
- 'Pragma: no-cache',
- 'Connection: Keep-Alive']
+ headers = ['Connection: Keep-Alive']
curl.setopt(pycurl.HTTPHEADER, headers + more_headers)
curl.perform()
except pycurl.error, e:
=== modified file 'bzrlib/transport/http/_urllib2_wrappers.py'
--- a/bzrlib/transport/http/_urllib2_wrappers.py 2007-11-05 13:21:30 +0000
+++ b/bzrlib/transport/http/_urllib2_wrappers.py 2007-11-20 09:27:49 +0000
@@ -316,9 +316,7 @@
# wins).
handler_order = 400
- _default_headers = {'Pragma': 'no-cache',
- 'Cache-control': 'max-age=0',
- 'Connection': 'Keep-Alive',
+ _default_headers = {'Connection': 'Keep-Alive',
# FIXME: Spell it User-*A*gent once we
# know how to properly avoid bogus
# urllib2 using capitalize() for headers
More information about the bazaar-commits
mailing list