summaryrefslogtreecommitdiff
path: root/cherrypy/lib/cptools.py
diff options
context:
space:
mode:
authorLakin Wecker <none@none>2009-05-31 00:27:42 +0000
committerLakin Wecker <none@none>2009-05-31 00:27:42 +0000
commit5da41796e4c52b19b022175c6bfd3498ed0cd6e1 (patch)
treef3be3d3fb0e10ccd730935cdc8c09cc893318d8b /cherrypy/lib/cptools.py
parent720bdb427d064dcaacb758558787f5a3adfe59fc (diff)
downloadcherrypy-git-5da41796e4c52b19b022175c6bfd3498ed0cd6e1.tar.gz
trunk - Porting the cherrypy.lib.httputil name change. It'll be easier to maintain two released branches if the modules are named the same. However, in the 2.6 branch we'll leave cherrypy.lib.http working and deprecate it for 3.3.
Diffstat (limited to 'cherrypy/lib/cptools.py')
-rw-r--r--cherrypy/lib/cptools.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/cherrypy/lib/cptools.py b/cherrypy/lib/cptools.py
index b32b418f..6a44b346 100644
--- a/cherrypy/lib/cptools.py
+++ b/cherrypy/lib/cptools.py
@@ -14,7 +14,7 @@ except NameError:
from sets import Set as set
import cherrypy
-from cherrypy.lib import http as _http
+from cherrypy.lib import httputil as _httputil
# Conditional HTTP request support #
@@ -41,7 +41,7 @@ def validate_etags(autotags=False):
if hasattr(response, "ETag"):
return
- status, reason, msg = _http.valid_status(response.status)
+ status, reason, msg = _httputil.valid_status(response.status)
etag = response.headers.get('ETag')
@@ -84,7 +84,7 @@ def validate_since():
response = cherrypy.response
lastmod = response.headers.get('Last-Modified')
if lastmod:
- status, reason, msg = _http.valid_status(response.status)
+ status, reason, msg = _httputil.valid_status(response.status)
request = cherrypy.request
@@ -443,26 +443,26 @@ def accept(media=None):
raise cherrypy.HTTPError(406, msg)
-class MonitoredHeaderMap(_http.HeaderMap):
+class MonitoredHeaderMap(_httputil.HeaderMap):
def __init__(self):
self.accessed_headers = set()
def __getitem__(self, key):
self.accessed_headers.add(key)
- return _http.HeaderMap.__getitem__(self, key)
+ return _httputil.HeaderMap.__getitem__(self, key)
def __contains__(self, key):
self.accessed_headers.add(key)
- return _http.HeaderMap.__contains__(self, key)
+ return _httputil.HeaderMap.__contains__(self, key)
def get(self, key, default=None):
self.accessed_headers.add(key)
- return _http.HeaderMap.get(self, key, default=default)
+ return _httputil.HeaderMap.get(self, key, default=default)
def has_key(self, key):
self.accessed_headers.add(key)
- return _http.HeaderMap.has_key(self, key)
+ return _httputil.HeaderMap.has_key(self, key)
def autovary():