From 523fed1d2faafa6610f27dad9bbb7d7c4e122ea5 Mon Sep 17 00:00:00 2001 From: Ben Cail Date: Fri, 27 Oct 2023 09:23:07 -0400 Subject: Fixed #32106 -- Preserved HTTP_HOST in test Client when following redirects. Co-authored-by: David Sanders --- django/test/client.py | 1 + 1 file changed, 1 insertion(+) (limited to 'django') diff --git a/django/test/client.py b/django/test/client.py index d44e30ff56..766b60863f 100644 --- a/django/test/client.py +++ b/django/test/client.py @@ -901,6 +901,7 @@ class ClientMixin: extra["wsgi.url_scheme"] = url.scheme if url.hostname: extra["SERVER_NAME"] = url.hostname + extra["HTTP_HOST"] = url.hostname if url.port: extra["SERVER_PORT"] = str(url.port) -- cgit v1.3