diff options
| author | Hasan Ramezani <hasan.r67@gmail.com> | 2019-10-26 16:42:32 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-10-29 09:22:26 +0100 |
| commit | e3d0b4d5501c6d0bc39f035e4345e5bdfde12e41 (patch) | |
| tree | a8ddbafdf4a38a87df6f65fc4d02dba08c725096 /django/http/response.py | |
| parent | 39a34d4bf94bc8325119bc23b64f3a041a85dd2d (diff) | |
Fixed #30899 -- Lazily compiled import time regular expressions.
Diffstat (limited to 'django/http/response.py')
| -rw-r--r-- | django/http/response.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/django/http/response.py b/django/http/response.py index c39519c4bb..269953c0af 100644 --- a/django/http/response.py +++ b/django/http/response.py @@ -17,8 +17,9 @@ from django.http.cookie import SimpleCookie from django.utils import timezone from django.utils.encoding import iri_to_uri from django.utils.http import http_date +from django.utils.regex_helper import _lazy_re_compile -_charset_from_content_type_re = re.compile(r';\s*charset=(?P<charset>[^\s;]+)', re.I) +_charset_from_content_type_re = _lazy_re_compile(r';\s*charset=(?P<charset>[^\s;]+)', re.I) class BadHeaderError(ValueError): |
