Skip to content

Commit f7a4db3

Browse files
committed
roundup_server: Fix endless redirect on http://localhost:8917/demo?anything
1 parent 90636ac commit f7a4db3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

roundup/scripts/roundup_server.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,9 @@ def inner_run_cgi(self):
336336
self.send_response(301)
337337
# redirect - XXX https??
338338
protocol = 'http'
339-
url = '%s://%s%s/'%(protocol, self.headers['host'], self.path)
339+
url = '%s://%s%s/'%(protocol, self.headers['host'], rest)
340+
if query:
341+
url += '?' + query
340342
self.send_header('Location', url)
341343
self.end_headers()
342344
self.wfile.write('Moved Permanently')

0 commit comments

Comments
 (0)