Django

Code

Show
Ignore:
Timestamp:
06/25/07 07:47:19 (2 years ago)
Author:
mtredinnick
Message:

unicode: Merged from trunk up to [5530]. Oracle backend has not been ported to
support unicode yet.

Files:

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  
    1212 
    1313        - 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. 
    1516 
    1617        - ETags: If the USE_ETAGS setting is set, ETags will be calculated from 
     
    7576        # Use ETags, if requested. 
    7677        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() 
    7882            if response.status_code >= 200 and response.status_code < 300 and request.META.get('HTTP_IF_NONE_MATCH') == etag: 
    7983                response = http.HttpResponseNotModified()