summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorBen Cail <bcail@crossway.org>2023-10-27 09:23:07 -0400
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-10-31 05:29:43 +0100
commit523fed1d2faafa6610f27dad9bbb7d7c4e122ea5 (patch)
tree775c155ee072fed7f2676511dba12876e179feef /django
parent9b18af4f6f12b9d25157e0b5afc3dca198f6dd06 (diff)
Fixed #32106 -- Preserved HTTP_HOST in test Client when following redirects.
Co-authored-by: David Sanders <shang.xiao.sanders@gmail.com>
Diffstat (limited to 'django')
-rw-r--r--django/test/client.py1
1 files changed, 1 insertions, 0 deletions
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)