~earboxer/browset

dd3051a14f4f30f0942e01c2652fec0caff5e7e2 — Zach DeCook 1 year, 1 month ago a4640ce
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]