Mercurial > p > roundup > code
comparison roundup/scripts/roundup_server.py @ 6528:6cf050b43eaf
Send content-length for /favico.ico
Browser was stuck trying to download and server was reporting
connection timeout after a minute.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sun, 07 Nov 2021 12:42:49 -0500 |
| parents | a036712c96f4 |
| children | c3dfc4977ec6 |
comparison
equal
deleted
inserted
replaced
| 6527:5ad7fb912227 | 6528:6cf050b43eaf |
|---|---|
| 319 if favicon_fileobj is None: | 319 if favicon_fileobj is None: |
| 320 favicon_fileobj = io.BytesIO(favico) | 320 favicon_fileobj = io.BytesIO(favico) |
| 321 | 321 |
| 322 self.send_response(200) | 322 self.send_response(200) |
| 323 self.send_header('Content-Type', 'image/x-icon') | 323 self.send_header('Content-Type', 'image/x-icon') |
| 324 self.send_header('Content-Length', len(favico)) | |
| 324 self.end_headers() | 325 self.end_headers() |
| 325 | 326 |
| 326 # this bufsize is completely arbitrary, I picked 4K because | 327 # this bufsize is completely arbitrary, I picked 4K because |
| 327 # it sounded good. if someone knows of a better buffer size, | 328 # it sounded good. if someone knows of a better buffer size, |
| 328 # feel free to plug it in. | 329 # feel free to plug it in. |
