Django

Code

Ticket #6621: 6621.diff

File 6621.diff, 0.9 kB (added by programmerq, 5 months ago)

Now applies cleanly to trunk

  • a/django/http/__init__.py

    old new  
    11import os 
     2import re 
    23from Cookie import SimpleCookie, CookieError 
    34from pprint import pformat 
    45from urllib import urlencode 
     
    1718from utils import * 
    1819 
    1920RESERVED_CHARS="!*'();:@&=+$,/?%#[]" 
     21ABS_URI_RE = re.compile('^https?:') 
    2022 
    2123class Http404(Exception): 
    2224    pass 
     
    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)