diff --git a/server.py b/server.py index edd1603..aff8636 100644 --- a/server.py +++ b/server.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 import asyncio, traceback, socket, ssl -from urllib.parse import urlparse +from urllib.parse import urlparse, quote from flask import Flask, request, redirect, send_file, Response from hypercorn.config import Config from hypercorn.asyncio import serve @@ -70,7 +70,7 @@ def relay(): i = i.replace("<", "<") if firstline: if i.split(" ")[0][0] == "3": - return redirect("/gem?gemini=" + i.split(" ")[1][9:]) + return redirect("/gem?gemini=" + quote(i.split(" ")[1][9:], safe='')) elif i.split(" ")[0][0] == "1": return f'\nInput required

Input required

The specified Gemini server wants more data: "

{i}
"




' elif i.split(" ")[0][0] != "2":