From 3db84b5526a16a136862381c6f8b08c59da4cb82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Silva?= Date: Tue, 9 May 2017 19:55:03 +0100 Subject: [PATCH] Fixed #28081 -- Stopped setting Content-Length=0 in conditional_content_removal() per RFC 7230. --- AUTHORS | 1 + django/test/client.py | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 8f4732d9860..3664c6a20f4 100644 --- a/AUTHORS +++ b/AUTHORS @@ -380,6 +380,7 @@ answer newbie questions, and generally made Django that much better: Jiri Barton Joachim Jablon Joao Oliveira + Joao Pedro Silva Joe Heck Joel Bohman Joel Heenan diff --git a/django/test/client.py b/django/test/client.py index f4394d69f5c..f1bfa23eb61 100644 --- a/django/test/client.py +++ b/django/test/client.py @@ -99,7 +99,6 @@ def conditional_content_removal(request, response): response.streaming_content = [] else: response.content = b'' - response['Content-Length'] = '0' if request.method == 'HEAD': if response.streaming: response.streaming_content = []