diff --git a/mitama/app/__init__.py b/mitama/app/__init__.py index ba2662a..0596beb 100644 --- a/mitama/app/__init__.py +++ b/mitama/app/__init__.py @@ -85,11 +85,9 @@ def handle(self, req: Request): for path in self.paths: filename = path / req.params['path'] if filename.is_file(): - mime = guess_type(str(filename)) or 'application/octet-stream' + mime = guess_type(str(filename)) or ('application/octet-stream', ) with open(filename, 'rb') as f: - return Response(body = f.read(), headers={ - 'content-type': mime[0] - }) + return Response(body = f.read(), content_type = mime[0]) for path in self.paths: filename = path / '404.html' if filename.is_file():