diff --git a/server.py b/server.py index 5a04a70..8e7a10c 100644 --- a/server.py +++ b/server.py @@ -1,7 +1,7 @@ #!/usr/bin/python3 import asyncio, traceback, socket, ssl from urllib.parse import urlparse -from flask import Flask, request, redirect, send_file +from flask import Flask, request, redirect, send_file, Response from hypercorn.config import Config from hypercorn.asyncio import serve app = Flask(__name__) @@ -69,7 +69,7 @@ def relay(): else: firstline = False if i.split(" ")[1] != "text/gemini": - return " ".join(received.split("\n")[1:]) + return Response(" ".join(received.split("\n")[1:]), mimetype=i.split(" ")[1]) else: if i[0:2] == "# ": if title == "Something went wrong...":