From 9f55626c309fbf140229e87f2bc463761f585b81 Mon Sep 17 00:00:00 2001
From: Luke Faraone <lfaraone@debian.org>
Date: Wed, 10 Aug 2016 19:38:54 +0000
Subject: [PATCH] Add support for IPv6-formatted IPv4 addresses
This implements support for addresses of the form '::ffff:169.254.169.254',
which were previously rejected in error.
Patch provided in https://launchpad.net/bugs/1611923 by LaMont Jones.
---
django/http/request.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/django/http/request.py b/django/http/request.py
index 1dedf5d..271ab30 100644
a
|
b
|
from django.utils.six.moves.urllib.parse import (
|
24 | 24 | ) |
25 | 25 | |
26 | 26 | RAISE_ERROR = object() |
27 | | host_validation_re = re.compile(r"^([a-z0-9.-]+|\[[a-f0-9]*:[a-f0-9:]+\])(:\d+)?$") |
| 27 | host_validation_re = re.compile(r"^([a-z0-9.-]+|\[[a-f0-9]*:[a-f0-9\.:]+\])(:\d+)?$") |
28 | 28 | |
29 | 29 | |
30 | 30 | class UnreadablePostError(IOError): |