Changeset 5491 for django/branches/boulder-oracle-sprint/django/middleware
- Timestamp:
- 06/18/07 11:43:17 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/boulder-oracle-sprint/django/middleware/common.py
r5422 r5491 12 12 13 13 - URL rewriting: Based on the APPEND_SLASH and PREPEND_WWW settings, 14 this middleware appends missing slashes and/or prepends missing "www."s. 14 this middleware appends missing slashes and/or prepends missing 15 "www."s. 15 16 16 17 - ETags: If the USE_ETAGS setting is set, ETags will be calculated from … … 75 76 # Use ETags, if requested. 76 77 if settings.USE_ETAGS: 77 etag = md5.new(response.content).hexdigest() 78 if response.has_header('ETag'): 79 etag = response['ETag'] 80 else: 81 etag = md5.new(response.content).hexdigest() 78 82 if response.status_code >= 200 and response.status_code < 300 and request.META.get('HTTP_IF_NONE_MATCH') == etag: 79 83 response = http.HttpResponseNotModified()
