diff roundup/scripts/roundup_server.py @ 4913:8f6cfe824c9f

roundup_server: Fix endless redirect on http://localhost:8917/demo?anything
author anatoly techtonik <techtonik@gmail.com>
date Thu, 17 Jul 2014 02:27:06 +0300
parents a0a7a6ca1586
children 96dc9f07340a
line wrap: on
line diff
--- a/roundup/scripts/roundup_server.py	Thu Jul 17 02:25:50 2014 +0300
+++ b/roundup/scripts/roundup_server.py	Thu Jul 17 02:27:06 2014 +0300
@@ -336,7 +336,9 @@
             self.send_response(301)
             # redirect - XXX https??
             protocol = 'http'
-            url = '%s://%s%s/'%(protocol, self.headers['host'], self.path)
+            url = '%s://%s%s/'%(protocol, self.headers['host'], rest)
+            if query:
+               url += '?' + query
             self.send_header('Location', url)
             self.end_headers()
             self.wfile.write('Moved Permanently')

Roundup Issue Tracker: http://roundup-tracker.org/