diff options
author | bptato <nincsnevem662@gmail.com> | 2024-08-11 14:05:15 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-08-11 14:05:15 +0200 |
commit | a0c6f80f76d60bc2bb36942d4162b90e6b5aa2a2 (patch) | |
tree | dbf93dc3b168c4a9e135f0fa4e1300892645ba68 /src/server/buffer.nim | |
parent | d0910f85adfec4a2cddfe2297be821841f4dd671 (diff) | |
download | chawan-a0c6f80f76d60bc2bb36942d4162b90e6b5aa2a2.tar.gz |
dom: remove generic JS bindings
Dispatch manually with fromJS instead.
Diffstat (limited to 'src/server/buffer.nim')
-rw-r--r-- | src/server/buffer.nim | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/server/buffer.nim b/src/server/buffer.nim index 7abac9e1..f92d8174 100644 --- a/src/server/buffer.nim +++ b/src/server/buffer.nim @@ -1194,14 +1194,9 @@ proc cancel*(buffer: Buffer) {.proxy.} = #https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#multipart/form-data-encoding-algorithm proc serializeMultipart(entries: seq[FormDataEntry]): FormData = - let formData = newFormData0() - for entry in entries: - let name = makeCRLF(entry.name) - if entry.isstr: - let value = makeCRLF(entry.svalue) - formData.append(name, value) - else: - formData.append(name, entry.value, some(entry.filename)) + let formData = newFormData0(entries) + for entry in formData.entries.mitems: + entry.name = makeCRLF(entry.name) return formData proc serializePlainTextFormData(kvs: seq[(string, string)]): string = |