diff options
author | bptato <nincsnevem662@gmail.com> | 2024-09-28 17:54:13 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-09-28 17:54:13 +0200 |
commit | 6a0e957e1f2c9f5bea0882efbf2e0494cd5074fa (patch) | |
tree | 3d6206a2bc8676d2fd913c3958e5186fc3375c2b /adapter/protocol/gopher.nim | |
parent | 9c257361388f5007871a36eea3abc815a8740d66 (diff) | |
download | chawan-6a0e957e1f2c9f5bea0882efbf2e0494cd5074fa.tar.gz |
loader: clean up connecterror
* allow string values for public errors * remove unused errors * update naming
Diffstat (limited to 'adapter/protocol/gopher.nim')
-rw-r--r-- | adapter/protocol/gopher.nim | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/adapter/protocol/gopher.nim b/adapter/protocol/gopher.nim index 14e34b7a..13ade18c 100644 --- a/adapter/protocol/gopher.nim +++ b/adapter/protocol/gopher.nim @@ -9,7 +9,6 @@ import curlwrap import ../gophertypes -import loader/connecterror import utils/twtstr type GopherHandle = ref object @@ -58,7 +57,7 @@ proc main() = let curl = curl_easy_init() doAssert curl != nil if getEnv("REQUEST_METHOD") != "GET": - stdout.write("Cha-Control: ConnectionError " & $int(ERROR_INVALID_METHOD)) + stdout.write("Cha-Control: ConnectionError InvalidMethod") return var path = getEnv("MAPPED_URI_PATH") if path.len < 1: @@ -84,7 +83,7 @@ proc main() = const flags = cuint(CURLU_PUNY2IDN) let surl = url.get(CURLUPART_URL, flags) if surl == nil: - stdout.write("Cha-Control: ConnectionError " & $int(ERROR_INVALID_URL)) + stdout.write("Cha-Control: ConnectionError InvalidURL") else: op.loadSearch($surl) else: |