Ticket #4994: common-middleware-fix.patch

File common-middleware-fix.patch, 639 bytes (added by colin@…, 8 years ago)

Patch for 304 and Cookies

  • django/middleware/common.py

     
    8080            else:
    8181                etag = md5.new(response.content).hexdigest()
    8282            if response.status_code >= 200 and response.status_code < 300 and request.META.get('HTTP_IF_NONE_MATCH') == etag:
     83                oldCookies = response.cookies
    8384                response = http.HttpResponseNotModified()
     85                response.cookies = oldCookies
    8486            else:
    8587                response['ETag'] = etag
    8688
Back to Top