diff options
author | bptato <nincsnevem662@gmail.com> | 2025-04-10 19:39:08 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2025-04-10 19:39:08 +0200 |
commit | 4a40cc20b9cacc0c538d52e3131999d0de674c99 (patch) | |
tree | 4dd1a8fc2d5b97bf7174c1c4545861c2209a4652 | |
parent | 5868af42342b9de9ef0f8b2666af7b308ae3f924 (diff) | |
download | chawan-4a40cc20b9cacc0c538d52e3131999d0de674c99.tar.gz |
formdata: avoid sending CRLF for epilogue
it *is* allowed by the RFC, but others don't do it and some servers choke on it.
-rw-r--r-- | src/types/formdata.nim | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/types/formdata.nim b/src/types/formdata.nim index 937ec275..42398b7f 100644 --- a/src/types/formdata.nim +++ b/src/types/formdata.nim @@ -75,7 +75,6 @@ proc calcLength*(this: FormData): int = result += "\r\n".len # header is always followed by \r\n result += "\r\n".len # value is always followed by \r\n result += "--".len + this.boundary.len + "--\r\n".len - result += "\r\n".len proc getContentType*(this: FormData): string = return "multipart/form-data; boundary=" & this.boundary @@ -115,4 +114,3 @@ proc writeEntry*(stream: DynStream; entry: FormDataEntry; boundary: string) = proc writeEnd*(stream: DynStream; boundary: string) = stream.write("--" & boundary & "--\r\n") - stream.write("\r\n") |