about summary refs log tree commit diff stats
path: root/src/types
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-12-10 11:47:11 +0100
committerbptato <nincsnevem662@gmail.com>2023-12-10 15:08:53 +0100
commit2dec7483045c9e5696182db7b4ad842491b6c2b2 (patch)
treeeb4173f62684a6334a75254c88a3b0d840284ea7 /src/types
parente5a0fd6af4296f76987530a9566eb019307fa8bf (diff)
downloadchawan-2dec7483045c9e5696182db7b4ad842491b6c2b2.tar.gz
Enable finger protocol by default
* Add a default urimethodmap that points finger: to cha-finger
* Install cha-finger to /usr/local/libexec/cha/cgi-bin by default
* cha-finger: use ALL_PROXY if given, die if curl is not installed
Diffstat (limited to 'src/types')
-rw-r--r--src/types/urimethodmap.nim4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/types/urimethodmap.nim b/src/types/urimethodmap.nim
index 283564a2..f9331cfd 100644
--- a/src/types/urimethodmap.nim
+++ b/src/types/urimethodmap.nim
@@ -69,3 +69,7 @@ proc parseURIMethodMap*(this: var URIMethodMap, s: string) =
     elif v.startsWith("/cgi-bin/"):
       v = "cgi-bin:" & v.substr("/cgi-bin/".len)
     discard this.map.hasKeyOrPut(k, v)
+
+proc parseURIMethodMap*(s: string): URIMethodMap =
+  result = URIMethodMap()
+  result.parseURIMethodMap(s)