Ticket #27046: 0001-Add-support-for-IPv6-formatted-IPv4-addresses.patch

File 0001-Add-support-for-IPv6-formatted-IPv4-addresses.patch, 955 bytes (added by Luke Faraone, 8 years ago)
  • django/http/request.py

    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 (  
    2424)
    2525
    2626RAISE_ERROR = object()
    27 host_validation_re = re.compile(r"^([a-z0-9.-]+|\[[a-f0-9]*:[a-f0-9:]+\])(:\d+)?$")
     27host_validation_re = re.compile(r"^([a-z0-9.-]+|\[[a-f0-9]*:[a-f0-9\.:]+\])(:\d+)?$")
    2828
    2929
    3030class UnreadablePostError(IOError):
Back to Top