diff roundup/scripts/roundup_server.py @ 8000:683af7c57ce5

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).
author John Rouillard <rouilj@ieee.org>
date Sun, 26 May 2024 11:28:55 -0400
parents 216662fbaaee
children 0f5d31be5418
line wrap: on
line diff
--- a/roundup/scripts/roundup_server.py	Sun May 26 11:14:10 2024 -0400
+++ b/roundup/scripts/roundup_server.py	Sun May 26 11:28:55 2024 -0400
@@ -405,6 +405,7 @@
             if query:
                 url += '?' + query
             self.send_header('Location', url)
+            self.send_header('Content-Length', 17)
             self.end_headers()
             self.wfile.write(b'Moved Permanently')
             return

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