diff options
| author | Tim Graham <timograham@gmail.com> | 2016-05-03 12:04:08 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-05-03 12:04:08 -0400 |
| commit | ead21a1949e408cf37226049559d0e71e3fdff6d (patch) | |
| tree | c79b379428fd292a747a3c854d166fe48d2572f6 | |
| parent | ac77c55bc5fc54cd763a7ae426784650a8cc97c9 (diff) | |
Refs #22897 -- Removed unneeded empty string QueryDict argument.
| -rw-r--r-- | django/http/multipartparser.py | 4 | ||||
| -rw-r--r-- | django/http/request.py | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/django/http/multipartparser.py b/django/http/multipartparser.py index 67d0fc48d5..e61eee9200 100644 --- a/django/http/multipartparser.py +++ b/django/http/multipartparser.py @@ -120,7 +120,7 @@ class MultiPartParser(object): # HTTP spec says that Content-Length >= 0 is valid # handling content-length == 0 before continuing if self._content_length == 0: - return QueryDict('', encoding=self._encoding), MultiValueDict() + return QueryDict(encoding=self._encoding), MultiValueDict() # See if any of the handlers take care of the parsing. # This allows overriding everything if need be. @@ -135,7 +135,7 @@ class MultiPartParser(object): return result[0], result[1] # Create the data structures to be used later. - self._post = QueryDict('', mutable=True) + self._post = QueryDict(mutable=True) self._files = MultiValueDict() # Instantiate the parser and stream: diff --git a/django/http/request.py b/django/http/request.py index 2440b11758..d8f5cd7952 100644 --- a/django/http/request.py +++ b/django/http/request.py @@ -267,14 +267,14 @@ class HttpRequest(object): return self._body def _mark_post_parse_error(self): - self._post = QueryDict('') + self._post = QueryDict() self._files = MultiValueDict() self._post_parse_error = True def _load_post_and_files(self): """Populate self._post and self._files if the content-type is a form type""" if self.method != 'POST': - self._post, self._files = QueryDict('', encoding=self._encoding), MultiValueDict() + self._post, self._files = QueryDict(encoding=self._encoding), MultiValueDict() return if self._read_started and not hasattr(self, '_body'): self._mark_post_parse_error() @@ -301,7 +301,7 @@ class HttpRequest(object): elif self.content_type == 'application/x-www-form-urlencoded': self._post, self._files = QueryDict(self.body, encoding=self._encoding), MultiValueDict() else: - self._post, self._files = QueryDict('', encoding=self._encoding), MultiValueDict() + self._post, self._files = QueryDict(encoding=self._encoding), MultiValueDict() def close(self): if hasattr(self, '_files'): @@ -473,7 +473,7 @@ class QueryDict(MultiValueDict): :arg safe: Used to specify characters which do not require quoting, for example:: - >>> q = QueryDict('', mutable=True) + >>> q = QueryDict(mutable=True) >>> q['next'] = '/a&b/' >>> q.urlencode() 'next=%2Fa%26b%2F' |
