diff --git a/tornado/web.py b/tornado/web.py index 905621c2..af5ea512 100644 --- a/tornado/web.py +++ b/tornado/web.py @@ -500,10 +500,8 @@ class RequestHandler(object): else: assert isinstance(status, int) and 300 <= status <= 399 self.set_status(status) - # Remove whitespace - url = re.sub(br"[\x00-\x20]+", "", utf8(url)) self.set_header("Location", urlparse.urljoin(utf8(self.request.uri), - url)) + utf8(url))) self.finish() def write(self, chunk):