Skip to content

Commit d7a7ec3

Browse files
committed
fix: add content-length to 301 response
If the root URL is missing the trailing /, roundup-server returns a 301 redirect with the trailing /. However it was missing the content-length that allows the client to handle the response and redirect and reuse the connection (for http 1.1).
1 parent f2cf3bf commit d7a7ec3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

roundup/scripts/roundup_server.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,7 @@ def inner_run_cgi(self):
405405
if query:
406406
url += '?' + query
407407
self.send_header('Location', url)
408+
self.send_header('Content-Length', 17)
408409
self.end_headers()
409410
self.wfile.write(b'Moved Permanently')
410411
return

0 commit comments

Comments
 (0)