MCPcopy Create free account
hub / github.com/bugy/script-server / set_extra_headers

Method set_extra_headers

src/web/server.py:640–645  ·  view source on GitHub ↗
(self, path)

Source from the content-addressed store, hash-verified

638
639class DownloadResultFile(AuthorizedStaticFileHandler):
640 def set_extra_headers(self, path):
641 super().set_extra_headers(path)
642
643 filename = os.path.basename(path)
644 encoded_filename = urllib.parse.quote(filename, encoding='utf-8')
645 self.set_header('Content-Disposition', 'attachment; filename*=UTF-8\'\'' + encoded_filename + '')
646
647 @check_authorization_sync
648 def validate_absolute_path(self, root, absolute_path):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected