From d4dc2f603bcc8eb0c85fb65fea5f9b02e3cdd8f3 Mon Sep 17 00:00:00 2001
From: swee The specified Gemini server wants more data: "Something went wrong...
\n"
title = "Something went wrong..."
try:
gsocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- fulladdr = "gemini://" + url
+ fulladdr = "gemini://" + url + ("?" + queries if queries != None else "")
gemsocket = ssl._create_unverified_context().wrap_socket(gsocket, server_hostname=urlparse(fulladdr).hostname)
gemsocket.connect((urlparse(fulladdr).hostname, 1965))
- gemsocket.send(bytes("gemini://" + url + "\r\n", "UTF-8"))
+ gemsocket.send(bytes(fulladdr + "\r\n", "UTF-8"))
received = ""
while True:
gemresponse = gemsocket.recv(2048)
@@ -70,6 +71,8 @@ def relay():
if firstline:
if i.split(" ")[0][0] == "3":
return redirect("/gem?gemini=" + i.split(" ")[1][9:])
+ elif i.split(" ")[0][0] == "1":
+ return f'\nInput required
{i}
"
The specified Gemini server returned a status of: {i}
' else: