From 8dc5d8398c8eedcd44e549370172bac20ee51f41 Mon Sep 17 00:00:00 2001 From: swee Date: Mon, 13 Jan 2025 16:27:15 -0800 Subject: [PATCH] Update server.py --- server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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...":