Ticket #6621: uri_fix.diff
File uri_fix.diff, 899 bytes (added by , 17 years ago) |
---|
-
django/http/__init__.py
1 1 import os 2 import re 2 3 from Cookie import SimpleCookie 3 4 from pprint import pformat 4 5 from urllib import urlencode … … 8 9 from utils import * 9 10 10 11 RESERVED_CHARS="!*'();:@&=+$,/?%#[]" 12 ABS_URI_RE = re.compile('^https?:') 11 13 12 14 try: 13 15 # The mod_python version is more efficient, so try importing it first. … … 71 73 """ 72 74 if not location: 73 75 location = self.get_full_path() 74 if not ':' in location:76 if not ABS_URI_RE.match(location): 75 77 current_uri = '%s://%s%s' % (self.is_secure() and 'https' or 'http', 76 78 self.get_host(), self.path) 77 79 location = urljoin(current_uri, location)