about summary refs log tree commit diff stats
path: root/src/types
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-12-14 14:33:28 +0100
committerbptato <nincsnevem662@gmail.com>2023-12-14 14:33:28 +0100
commit300944c355ce63efacf8f0a686fff8d6dcbb9e2c (patch)
tree1f3cef88902a7f31538de3ec71f984bef0843fe2 /src/types
parentae7cc86baff575bc6fa1d7e803858d54cbf69a8d (diff)
downloadchawan-300944c355ce63efacf8f0a686fff8d6dcbb9e2c.tar.gz
config: do not override user-defined urimethodmap
UMM resolution takes the first entry.
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 f9331cfd..48163668 100644
--- a/src/types/urimethodmap.nim
+++ b/src/types/urimethodmap.nim
@@ -73,3 +73,7 @@ proc parseURIMethodMap*(this: var URIMethodMap, s: string) =
 proc parseURIMethodMap*(s: string): URIMethodMap =
   result = URIMethodMap()
   result.parseURIMethodMap(s)
+
+proc append*(this: var URIMethodMap, that: URIMethodMap) =
+  for k, v in that.map:
+    discard this.map.hasKeyOrPut(k, v)
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189