diff options
author | bptato <nincsnevem662@gmail.com> | 2023-09-20 01:12:46 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-09-20 01:14:15 +0200 |
commit | ecfdd90f7947b65db1046cb2eeeaa8f1953b119f (patch) | |
tree | be0cc64cc1a3138c8d83205e1284309406ce96aa /src/loader/loader.nim | |
parent | a0f3631cc7373b513fa1ae2e9523b1db9dfc6eee (diff) | |
download | chawan-ecfdd90f7947b65db1046cb2eeeaa8f1953b119f.tar.gz |
loader: add gopher support
works
Diffstat (limited to 'src/loader/loader.nim')
-rw-r--r-- | src/loader/loader.nim | 5 |
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() |