diff --git a/gophersrv.py b/gophersrv.py index 09b5113..eb4ae94 100644 --- a/gophersrv.py +++ b/gophersrv.py @@ -68,12 +68,25 @@ def normalizepath(path): return '/'.join(path) # Error handling +def error(conn, ishttp, text, code): + sendheader(conn, ishttp, '1', code) + if ishttp: + conn.sendall('\n' + '\t
\n' + '\t\t%s
\n' + '\t\n' + '