1 | diff --git a/django/views/decorators/http.py b/django/views/decorators/http.py
|
---|
2 | index b763d6e..26b7f05 100644
|
---|
3 | --- a/django/views/decorators/http.py
|
---|
4 | +++ b/django/views/decorators/http.py
|
---|
5 | @@ -11,6 +11,7 @@ from calendar import timegm
|
---|
6 | from datetime import timedelta
|
---|
7 | from email.Utils import formatdate
|
---|
8 |
|
---|
9 | +from django.conf import settings
|
---|
10 | from django.utils.decorators import decorator_from_middleware, available_attrs
|
---|
11 | from django.utils.http import parse_etags, quote_etag
|
---|
12 | from django.utils.log import getLogger
|
---|
13 | @@ -113,7 +114,8 @@ def condition(etag_func=None, last_modified_func=None):
|
---|
14 | (if_match and if_none_match)):
|
---|
15 | # We only get here if no undefined combinations of headers are
|
---|
16 | # specified.
|
---|
17 | - if ((if_none_match and (res_etag in etags or
|
---|
18 | + if ((settings.USE_ETAGS and not etag_func) or
|
---|
19 | + (if_none_match and (res_etag in etags or
|
---|
20 | "*" in etags and res_etag)) and
|
---|
21 | (not if_modified_since or
|
---|
22 | res_last_modified == if_modified_since)):
|
---|
23 |
|
---|