Skip to content

Commit

Permalink
download 404
Browse files Browse the repository at this point in the history
  • Loading branch information
joknarf committed Dec 12, 2024
1 parent 6387b8e commit 257faa2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pywebfs/pywebfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,8 @@ def download(self, path):
super().end_headers()
with open(path, 'rb') as f:
self.copyfile(f, self.wfile)
else:
self.send_error(HTTPStatus.NOT_FOUND, "File not found")

def do_HEAD(self):
self.send_response(HTTPStatus.OK)
Expand Down

0 comments on commit 257faa2

Please sign in to comment.