about summary refs log tree commit diff stats
path: root/src/loader/loader.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-09-20 01:12:46 +0200
committerbptato <nincsnevem662@gmail.com>2023-09-20 01:14:15 +0200
commitecfdd90f7947b65db1046cb2eeeaa8f1953b119f (patch)
treebe0cc64cc1a3138c8d83205e1284309406ce96aa /src/loader/loader.nim
parenta0f3631cc7373b513fa1ae2e9523b1db9dfc6eee (diff)
downloadchawan-ecfdd90f7947b65db1046cb2eeeaa8f1953b119f.tar.gz
loader: add gopher support
works
Diffstat (limited to 'src/loader/loader.nim')
-rw-r--r--src/loader/loader.nim5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/loader/loader.nim b/src/loader/loader.nim
index 7ccd9a7f..663915fa 100644
--- a/src/loader/loader.nim
+++ b/src/loader/loader.nim
@@ -34,6 +34,7 @@ import loader/curlhandle
 import loader/data
 import loader/file
 import loader/ftp
+import loader/gopher
 import loader/headers
 import loader/http
 import loader/loaderhandle
@@ -119,6 +120,10 @@ proc loadResource(ctx: LoaderContext, request: Request, handle: LoaderHandle) =
     let handleData = handle.loadFtp(ctx.curlm, request)
     if handleData != nil:
       ctx.handleList.add(handleData)
+  of "gopher", "gophers":
+    let handleData = handle.loadGopher(ctx.curlm, request)
+    if handleData != nil:
+      ctx.handleList.add(handleData)
   else:
     discard handle.sendResult(ERROR_UNKNOWN_SCHEME)
     handle.close()