mirror of
https://github.com/django/django.git
synced 2025-10-26 15:16:09 +00:00
Fixed #7581 -- Added streaming responses.
Thanks mrmachine and everyone else involved on this long-standing ticket.
This commit is contained in:
@@ -95,7 +95,8 @@ def get_max_age(response):
|
||||
pass
|
||||
|
||||
def _set_response_etag(response):
|
||||
response['ETag'] = '"%s"' % hashlib.md5(response.content).hexdigest()
|
||||
if not response.streaming:
|
||||
response['ETag'] = '"%s"' % hashlib.md5(response.content).hexdigest()
|
||||
return response
|
||||
|
||||
def patch_response_headers(response, cache_timeout=None):
|
||||
|
||||
Reference in New Issue
Block a user