summaryrefslogtreecommitdiff
path: root/django/http
diff options
context:
space:
mode:
authorTom <tom@tomforb.es>2017-05-20 22:16:36 +0100
committerTim Graham <timograham@gmail.com>2017-05-27 13:59:05 -0400
commit7afb47646920ab3835dfa1750257dace01883a4b (patch)
tree8ee40e80cb841075fb6c282dfd72ed108b951066 /django/http
parent94475aab800fc492853b67ada6b6b33d47554393 (diff)
Fixed #28226 -- Replaced use of str.join() with concatenation.
Diffstat (limited to 'django/http')
-rw-r--r--django/http/multipartparser.py2
-rw-r--r--django/http/response.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/django/http/multipartparser.py b/django/http/multipartparser.py
index 080f45f8ef..f66cf2772f 100644
--- a/django/http/multipartparser.py
+++ b/django/http/multipartparser.py
@@ -401,7 +401,7 @@ class LazyStream:
return
self._update_unget_history(len(bytes))
self.position -= len(bytes)
- self._leftover = b''.join([bytes, self._leftover])
+ self._leftover = bytes + self._leftover
def _update_unget_history(self, num_bytes):
"""
diff --git a/django/http/response.py b/django/http/response.py
index 2495ebcc09..1083fd7dca 100644
--- a/django/http/response.py
+++ b/django/http/response.py
@@ -92,7 +92,7 @@ class HttpResponseBase:
return val if isinstance(val, bytes) else val.encode(encoding)
headers = [
- (b': '.join([to_bytes(key, 'ascii'), to_bytes(value, 'latin-1')]))
+ (to_bytes(key, 'ascii') + b': ' + to_bytes(value, 'latin-1'))
for key, value in self._headers.values()
]
return b'\r\n'.join(headers)