Ticket #2553: https_post_redirect2.patch
| File https_post_redirect2.patch, 1.0 KB (added by pkoelle@…, 2 years ago) |
|---|
-
trac/web/api.py
old new 325 325 326 326 self.send_response(status) 327 327 if not url.startswith('http://') and not url.startswith('https://'): 328 # Make sure the URL is absolute 329 url = urlparse.urlunparse((self.scheme, 330 urlparse.urlparse(self.base_url)[1], 331 url, None, None, None)) 328 # Make sure the URL is absolute, honor base_url for 329 # scheme and host if present 330 scheme, host, path, params, query, fragment = urlparse.urlparse( 331 self.abs_href()) 332 url = urlparse.urlunparse((scheme, host, url, None, None, None)) 333 332 334 self.send_header('Location', url) 333 335 self.send_header('Content-Type', 'text/plain') 334 336 self.send_header('Pragma', 'no-cache')
