diff options
Diffstat (limited to 'src/io/headers.nim')
-rw-r--r-- | src/io/headers.nim | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/io/headers.nim b/src/io/headers.nim index 3bc3659b..7db3d8c4 100644 --- a/src/io/headers.nim +++ b/src/io/headers.nim @@ -43,6 +43,11 @@ func newHeaders*(table: Table[string, string]): Headers = else: result.table[k] = @[v] +func clone*(headers: Headers): Headers = + return Headers( + table: headers.table + ) + proc add*(headers: var Headers, k, v: string) = let k = k.toHeaderCase() if k notin headers.table: |