From 5bea8d256dcf98f6346786f8a4804b84fee5da27 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Mon, 9 Jul 2018 11:44:49 -0400 Subject: Fixed #29553 -- Made test client set Content-Length header to a string rather than integer. --- django/test/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'django') diff --git a/django/test/client.py b/django/test/client.py index 776410cefa..d961c2c282 100644 --- a/django/test/client.py +++ b/django/test/client.py @@ -401,7 +401,7 @@ class RequestFactory: } if data: r.update({ - 'CONTENT_LENGTH': len(data), + 'CONTENT_LENGTH': str(len(data)), 'CONTENT_TYPE': content_type, 'wsgi.input': FakePayload(data), }) -- cgit v1.3