Changeset 1270
- Timestamp:
- 08/22/06 16:33:25
- Files:
-
- trunk/cherrypy/lib/cptools.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/lib/cptools.py
r1267 r1270 8 8 9 9 def validate_etags(autotags=False): 10 """Validate the current ETag against If-Match, If-None-Match headers.""" 10 """Validate the current ETag against If-Match, If-None-Match headers. 11 12 If autotags is True, an ETag response-header value will be provided 13 from an MD5 hash of the response body (unless some other code has 14 already provided an ETag header). If False, the ETag will not be 15 automatic, and if no other code has provided an ETag value, then no 16 checks will be performed against If-Match or If-None-Match headers. 17 """ 11 18 # Guard against being run twice. 12 19 if hasattr(cherrypy.response, "ETag"): … … 41 48 42 49 def validate_since(): 43 """Validate the current Last-Modified against If-Modified-Since headers.""" 50 """Validate the current Last-Modified against If-Modified-Since headers. 51 52 If no code has set the Last-Modified response header, then no validation 53 will be performed. 54 """ 44 55 lastmod = cherrypy.response.headers.get('Last-Modified') 45 56 if lastmod:

