diff roundup/cgi/client.py @ 6649:33616bc80baf

Fix hang in unsatisfyable range or HEAD request for static file Also update CHANGES with last three changes.
author John Rouillard <rouilj@ieee.org>
date Thu, 28 Apr 2022 19:21:08 -0400
parents 91ab3e0ffcd0
children b83b90d57846
line wrap: on
line diff
--- a/roundup/cgi/client.py	Thu Apr 28 18:14:22 2022 -0400
+++ b/roundup/cgi/client.py	Thu Apr 28 19:21:08 2022 -0400
@@ -2524,6 +2524,8 @@
         # indicating an invalid range.
         if (self.env['REQUEST_METHOD'] == 'HEAD'
             or self.response_code == http_.client.REQUESTED_RANGE_NOT_SATISFIABLE):
+            self.setHeader("Content-Length", 0)
+            self.header()
             return
         # Use the optimized "sendfile" operation, if possible.
         if hasattr(self.request, "sendfile"):

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