(request)
| 332 | |
| 333 | |
| 334 | def _callback_download(request): |
| 335 | filename = request.url.split("/")[-1] |
| 336 | file_pth = fixtures.path(f"mirror/{filename}") |
| 337 | if os.path.exists(file_pth): |
| 338 | with open(file_pth, "rb") as fd: |
| 339 | return (200, {'Content-length': str(os.stat(file_pth).st_size)}, fd.read()) |
| 340 | else: |
| 341 | return (404, {"Content-length": 0}, "") |
| 342 | |
| 343 | |
| 344 | def _callback(request): |