[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[minion-cvs] Tell HTTP proxies and friends not to cache directories.
Update of /home/minion/cvsroot/src/minion/lib/mixminion
In directory moria.mit.edu:/tmp/cvs-serv31791/lib/mixminion
Modified Files:
ClientDirectory.py
Log Message:
Tell HTTP proxies and friends not to cache directories.
Index: ClientDirectory.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/ClientDirectory.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- ClientDirectory.py 7 Nov 2003 10:43:18 -0000 1.12
+++ ClientDirectory.py 9 Nov 2003 23:28:10 -0000 1.13
@@ -112,7 +112,13 @@
if timeout: mixminion.NetUtils.setGlobalTimeout(timeout)
try:
try:
- infile = urllib2.urlopen(url)
+ # Tell HTTP proxies and their ilk not to cache the directory.
+ # Really, the directory server should set an Expires header
+ # in its response, but that's harder.
+ request = urllib2.Request(url,
+ headers={ 'Pragma' : 'no-cache',
+ 'Cache-Control' : 'no-cache', })
+ infile = urllib2.urlopen(request)
except IOError, e:
raise UIError(
("Couldn't connect to directory server: %s.\n"