Changeset 5531 for django/branches/unicode/django/middleware
- Timestamp:
- 06/25/07 07:47:19 (2 years ago)
- Files:
-
- django/branches/unicode (modified) (1 prop)
- django/branches/unicode/django/middleware/common.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/unicode
- Property svnmerge-integrated changed from /django/trunk:1-5460 to /django/trunk:1-5530
django/branches/unicode/django/middleware/common.py
r5419 r5531 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()
