Mercurial > p > roundup > code
comparison roundup/cgi/client.py @ 6656:b83b90d57846
Fix header value. needs to be string not integer.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Mon, 02 May 2022 16:17:13 -0400 |
| parents | 33616bc80baf |
| children | 408fd477761f |
comparison
equal
deleted
inserted
replaced
| 6655:a193653d6fa4 | 6656:b83b90d57846 |
|---|---|
| 2522 self.setHeader("Content-Length", str(length)) | 2522 self.setHeader("Content-Length", str(length)) |
| 2523 # If the client doesn't actually want the body, or if we are | 2523 # If the client doesn't actually want the body, or if we are |
| 2524 # indicating an invalid range. | 2524 # indicating an invalid range. |
| 2525 if (self.env['REQUEST_METHOD'] == 'HEAD' | 2525 if (self.env['REQUEST_METHOD'] == 'HEAD' |
| 2526 or self.response_code == http_.client.REQUESTED_RANGE_NOT_SATISFIABLE): | 2526 or self.response_code == http_.client.REQUESTED_RANGE_NOT_SATISFIABLE): |
| 2527 self.setHeader("Content-Length", 0) | 2527 self.setHeader("Content-Length", "0") |
| 2528 self.header() | 2528 self.header() |
| 2529 return | 2529 return |
| 2530 # Use the optimized "sendfile" operation, if possible. | 2530 # Use the optimized "sendfile" operation, if possible. |
| 2531 if hasattr(self.request, "sendfile"): | 2531 if hasattr(self.request, "sendfile"): |
| 2532 self.header() | 2532 self.header() |
