bottle icon indicating copy to clipboard operation
bottle copied to clipboard

Redirect bugfix

Open polymorphm opened this issue 9 years ago • 8 comments

tiny but important fix:

diff --git a/bottle.py b/bottle.py
index 535ddd3..359ceaf 100644
--- a/bottle.py
+++ b/bottle.py
@@ -2418,7 +2418,7 @@ def redirect(url, code=None):
     res = response.copy(cls=HTTPResponse)
     res.status = code
     res.body = ""
-    res.set_header('Location', urljoin(request.url, url))
+    res.set_header('Location', url)
     raise res

polymorphm avatar Apr 02 '15 01:04 polymorphm