Ticket #6621: 6621.diff

File 6621.diff, 907 bytes (added by Jeff Anderson, 16 years ago)

Now applies cleanly to trunk

  • django/http/__init__.py

    diff --git a/django/http/__init__.py b/django/http/__init__.py
    index ef15479..e429696 100644
    a b  
    11import os
     2import re
    23from Cookie import SimpleCookie, CookieError
    34from pprint import pformat
    45from urllib import urlencode
    from django.core.files import uploadhandler  
    1718from utils import *
    1819
    1920RESERVED_CHARS="!*'();:@&=+$,/?%#[]"
     21ABS_URI_RE = re.compile('^https?:')
    2022
    2123class Http404(Exception):
    2224    pass
    class HttpRequest(object):  
    7577        """
    7678        if not location:
    7779            location = self.get_full_path()
    78         if not ':' in location:
     80        if not ABS_URI_RE.match(location):
    7981            current_uri = '%s://%s%s' % (self.is_secure() and 'https' or 'http',
    8082                                         self.get_host(), self.path)
    8183            location = urljoin(current_uri, location)
Back to Top