about summary refs log tree commit diff stats
path: root/adapter/protocol/gopher.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-09-28 17:54:13 +0200
committerbptato <nincsnevem662@gmail.com>2024-09-28 17:54:13 +0200
commit6a0e957e1f2c9f5bea0882efbf2e0494cd5074fa (patch)
tree3d6206a2bc8676d2fd913c3958e5186fc3375c2b /adapter/protocol/gopher.nim
parent9c257361388f5007871a36eea3abc815a8740d66 (diff)
downloadchawan-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.nim5
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: