diff options
| author | Carlton Gibson <carlton.gibson@noumenal.es> | 2022-05-10 12:12:17 +0200 |
|---|---|---|
| committer | Carlton Gibson <carlton@noumenal.es> | 2022-05-11 14:06:31 +0200 |
| commit | 34e2148fc725e7200050f74130d7523e3cd8507a (patch) | |
| tree | b4bc74515b1d4911c6c07d5cd7697c78eff91407 /django/http/request.py | |
| parent | 02dbf1667c6da61ea9346f7c9f174a158b896811 (diff) | |
Refs #33173 -- Removed use of deprecated cgi module.
https://peps.python.org/pep-0594/#cgi
Diffstat (limited to 'django/http/request.py')
| -rw-r--r-- | django/http/request.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/django/http/request.py b/django/http/request.py index c25fa4379a..4b160bc5f4 100644 --- a/django/http/request.py +++ b/django/http/request.py @@ -1,4 +1,3 @@ -import cgi import codecs import copy from io import BytesIO @@ -22,7 +21,7 @@ from django.utils.datastructures import ( ) from django.utils.encoding import escape_uri_path, iri_to_uri from django.utils.functional import cached_property -from django.utils.http import is_same_domain +from django.utils.http import is_same_domain, parse_header_parameters from django.utils.regex_helper import _lazy_re_compile from .multipartparser import parse_header @@ -97,7 +96,7 @@ class HttpRequest: def _set_content_type_params(self, meta): """Set content_type, content_params, and encoding.""" - self.content_type, self.content_params = cgi.parse_header( + self.content_type, self.content_params = parse_header_parameters( meta.get("CONTENT_TYPE", "") ) if "charset" in self.content_params: |
