summaryrefslogtreecommitdiff
path: root/textproto/reader_test.ts
diff options
context:
space:
mode:
authorVincent LE GOFF <g_n_s@hotmail.fr>2019-05-18 20:05:27 +0200
committerRyan Dahl <ry@tinyclouds.org>2019-05-18 14:05:27 -0400
commitef4fd3d4cac4bc7b6b105067b730dbb14b6d0bff (patch)
treecb9dabd0551fddc7c655c47c0b57352f2f310eb7 /textproto/reader_test.ts
parent715fe3300e33aa72ed7d4f8d39a021ca8ba54936 (diff)
Fix denoland/deno_std#409 handle multipart header in mime reader (denoland/deno_std#415)
Original: https://github.com/denoland/deno_std/commit/92c26cc33183284737fd41685b26a15cab07405d
Diffstat (limited to 'textproto/reader_test.ts')
-rw-r--r--textproto/reader_test.ts17
1 files changed, 17 insertions, 0 deletions
diff --git a/textproto/reader_test.ts b/textproto/reader_test.ts
index b319e7809..2d054caba 100644
--- a/textproto/reader_test.ts
+++ b/textproto/reader_test.ts
@@ -165,3 +165,20 @@ test({
assert(err instanceof ProtocolError);
}
});
+
+test({
+ name: "[textproto] #409 issue : multipart form boundary",
+ async fn(): Promise<void> {
+ const input = [
+ "Accept: */*\r\n",
+ 'Content-Disposition: form-data; name="test"\r\n',
+ " \r\n",
+ "------WebKitFormBoundaryimeZ2Le9LjohiUiG--\r\n\n"
+ ];
+ const r = reader(input.join(""));
+ let [m, err] = await r.readMIMEHeader();
+ assertEquals(m.get("Accept"), "*/*");
+ assertEquals(m.get("Content-Disposition"), 'form-data; name="test"');
+ assert(!err);
+ }
+});