gemini: make errors text/plain
1 files changed, 2 insertions(+), 2 deletions(-) M protocol/gemini.py
M protocol/gemini.py => protocol/gemini.py +2 -2
@@ 26,12 26,12 @@ class GeminiProtocol(): s.sendall((url + '\r\n').encode("UTF-8")) fp = s.makefile("rb") except: return ("error",["error"]) return ("text/error",["error"]) header = fp.readline() header = header.decode("UTF-8").strip() if header[0:1] == "2": return (header[3:], fp) return ("error", [header]) return ("text/error", [header]) def _gethostname(url): return url.split('/')[2]