summaryrefslogtreecommitdiff
path: root/textproto/reader_test.ts
diff options
context:
space:
mode:
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);
+ }
+});