diff --git a/web.py b/web.py index d961b48..36a6b81 100644 --- a/web.py +++ b/web.py @@ -337,7 +337,6 @@ class _Handler(BaseHTTPRequestHandler): self.send_response(206) self.send_header('Content-Type', content_type) - self.send_header('Content-Disposition', f'inline; filename="{path.name}"') self.send_header('Content-Range', f'bytes {start}-{end}/{size}') self.send_header('Content-Length', str(length)) self.send_header('Accept-Ranges', 'bytes') @@ -355,7 +354,6 @@ class _Handler(BaseHTTPRequestHandler): else: self.send_response(200) self.send_header('Content-Type', content_type) - self.send_header('Content-Disposition', f'inline; filename="{path.name}"') self.send_header('Content-Length', str(size)) self.send_header('Accept-Ranges', 'bytes') self.end_headers() @@ -376,7 +374,7 @@ class _Handler(BaseHTTPRequestHandler): self._send(403, b'Forbidden', 'text/plain') return None - if not path.exists(): + if not path.is_file(): self._send(404, b'Not found', 'text/plain') return None