mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #32162 -- Fixed setting Content-Length header in AsyncRequestFactory.
This commit is contained in:
committed by
Mariusz Felisiak
parent
b03b19b585
commit
542b4b3ab4
@@ -540,7 +540,7 @@ class AsyncRequestFactory(RequestFactory):
|
||||
}
|
||||
if data:
|
||||
s['headers'].extend([
|
||||
(b'content-length', bytes(len(data))),
|
||||
(b'content-length', str(len(data)).encode('ascii')),
|
||||
(b'content-type', content_type.encode('ascii')),
|
||||
])
|
||||
s['_body_file'] = FakePayload(data)
|
||||
|
||||
Reference in New Issue
Block a user