(Re)introduce DefaultMultipartMessageReader

This commit introduces the DefaultMultipartMessageReader, a fully
reactive multipart parser without third party dependencies.

An earlier version of this code was introduced in fb642ce, but removed
again in 77c24aa because of buffering issues.

Closes gh-21659
This commit is contained in:
Arjen Poutsma
2020-05-28 16:22:09 +02:00
parent 57f868fcbd
commit 973ee9b852
18 changed files with 2434 additions and 34 deletions

View File

@@ -0,0 +1,13 @@
------WebKitFormBoundaryG8fJ50opQOML0oGD
Content-Disposition: form-data; name="file2"; filename="a.txt"
Content-Type: text/plain
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer iaculis metus id vestibulum nullam.
------WebKitFormBoundaryG8fJ50opQOML0oGD
Content-Disposition: form-data; name="file2"; filename="b.txt"
Content-Type: text/plain
.mallun mulubitsev di sutem silucai regetnI .tile gnicsipida rutetcesnoc ,tema tis rolod muspi meroL
------WebKitFormBoundaryG8fJ50opQOML0oGD--

View File

@@ -0,0 +1,4 @@
--boundary
Header: Value
a

View File

@@ -0,0 +1,5 @@
--boundary
Header: Value
a
--boundary

View File

@@ -0,0 +1,6 @@
--boundary
Header-1: Value1
Header-2: Value2
Header-3: Value3
Header-4: Value4
--boundary--

View File

@@ -0,0 +1,4 @@
--boundary
a
--boundary--

View File

@@ -0,0 +1,16 @@
This is the preamble. It is to be ignored, though it
is a handy place for mail composers to include an
explanatory note to non-MIME compliant readers.
--simple-boundary
This is implicitly typed plain ASCII text.
It does NOT end with a linebreak.
--simple-boundary
Content-type: text/plain; charset=us-ascii
This is explicitly typed plain ASCII text.
It DOES end with a linebreak.
--simple-boundary--
This is the epilogue. It is also to be ignored.