Ticket #6621: 6621.diff
| File 6621.diff, 0.9 kB (added by programmerq, 5 months ago) |
|---|
-
a/django/http/__init__.py
old new 1 1 import os 2 import re 2 3 from Cookie import SimpleCookie, CookieError 3 4 from pprint import pformat 4 5 from urllib import urlencode … … 17 18 from utils import * 18 19 19 20 RESERVED_CHARS="!*'();:@&=+$,/?%#[]" 21 ABS_URI_RE = re.compile('^https?:') 20 22 21 23 class Http404(Exception): 22 24 pass … … 75 77 """ 76 78 if not location: 77 79 location = self.get_full_path() 78 if not ':' in location:80 if not ABS_URI_RE.match(location): 79 81 current_uri = '%s://%s%s' % (self.is_secure() and 'https' or 'http', 80 82 self.get_host(), self.path) 81 83 location = urljoin(current_uri, location)
