From af3a3707045747e980a50e0d30fd91f8465d9fd0 Mon Sep 17 00:00:00 2001 From: GappleBee Date: Fri, 22 Nov 2024 22:17:14 +0000 Subject: [PATCH] Fixed regex error. --- django/http/request.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/django/http/request.py b/django/http/request.py index b718b09561..07d8011499 100644 --- a/django/http/request.py +++ b/django/http/request.py @@ -1,6 +1,7 @@ import codecs import copy import operator +import re from collections import namedtuple from io import BytesIO from itertools import chain @@ -814,7 +815,7 @@ def split_domain_port(host): """ host = host.lower() - host_match = host_validation_re.match(host) + host_match = re.match(host_validation_re, host) if not host_match: return "", ""