]> git.pld-linux.org Git - packages/Zope.git/blob - Zope-http-virtual-cache.patch
- fixed typo at Source5 installation
[packages/Zope.git] / Zope-http-virtual-cache.patch
1 --- Zope-2.6.2b5-src.orig/lib/python/Products/StandardCacheManagers/AcceleratedHTTPCacheManager.py 2002-08-14 18:25:12.000000000 -0400
2 +++ Zope-2.6.2b5-src/lib/python/Products/StandardCacheManagers/AcceleratedHTTPCacheManager.py 2003-02-27 16:26:02.000000000 -0500
3 @@ -45,7 +45,7 @@
4          phys_path = ob.getPhysicalPath()
5          if self.hit_counts.has_key(phys_path):
6              del self.hit_counts[phys_path]
7 -        ob_path = quote('/'.join(phys_path))
8 +        ob_path = '/'+ob.absolute_url(relative=1)
9          results = []
10          for url in self.notify_urls:
11              if not url:
12 @@ -57,6 +57,8 @@
13                  u = 'http://' + url
14              (scheme, host, path, params, query, fragment
15               ) = urlparse.urlparse(u)
16 +            if path[:8].lower() == '/http://':
17 +                path = path[1:]
18              if path[-1:] == '/':
19                  p = path[:-1] + ob_path
20              else:
21 @@ -67,6 +69,12 @@
22              errcode, errmsg, headers = h.getreply()
23              h.getfile().read()  # Mandatory for httplib?
24              results.append('%s %s' % (errcode, errmsg))
25 +            if p[-11:]=='/index_html':
26 +                h.putrequest('PURGE',p[:-10])
27 +                h.endheaders()
28 +                errcode, errmsg, headers = h.getreply()
29 +                h.getfile().read()  # Mandatory for httplib?
30 +                results.append('%s %s' % (errcode, errmsg))
31          return 'Server response(s): ' + ';'.join(results)
32
33      def ZCache_get(self, ob, view_name, keywords, mtime_func, default):
This page took 0.087614 seconds and 3 git commands to generate.