Skip to content

Commit 50b0bf6

Browse files
committed
Fix hang in unsatisfyable range or HEAD request for static file
Also update CHANGES with last three changes.
1 parent d1b8465 commit 50b0bf6

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

CHANGES.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ Fixed:
7878
- issue2551196 - Unset labelprop of a Multilink can lead to Python
7979
error when using context/history. (reported and initial patch: Nagy
8080
Gabor, John Rouillard)
81+
- Fix roundup-server to pass If-Range http header so Ranges work
82+
better. (John Rouillard)
83+
- issue2551183 - Replace references to distutils in
84+
roundup/dist/command (John Rouillard)
85+
- Fix hang if Range request was not able to be satified or a HEAD
86+
request was done.
8187

8288
Features:
8389

roundup/cgi/client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2524,6 +2524,8 @@ def write_file(self, filename):
25242524
# indicating an invalid range.
25252525
if (self.env['REQUEST_METHOD'] == 'HEAD'
25262526
or self.response_code == http_.client.REQUESTED_RANGE_NOT_SATISFIABLE):
2527+
self.setHeader("Content-Length", 0)
2528+
self.header()
25272529
return
25282530
# Use the optimized "sendfile" operation, if possible.
25292531
if hasattr(self.request, "sendfile"):

0 commit comments

Comments
 (0)