alanshaw / alanshaw/multipart-byte-range
Delimiters begin with Internet LineBreaks
- Dominant language
- JavaScript
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
I was looking at your library to learn how to use streamsearch-web for a generic multipart parser. I saw that you are using `--${boundary}` as a delimiter. Except in the case of empty preamble, this always is `\r\n--${boundary}` as per ABNF in [RFC2046](https://www.rfc-editor.org/rfc/rfc2046.html) (See `encapsulation` and `delimiter` in page 23).
It may be the case that the part body has the boundary starting without the CRLF, those must be ignored. Currently, as I understand, you are discarding the last two bytes of the body (which is before the boundary and is almost always but not always CRLF). Instead, you should look for `\r\n--${boundary}` itself.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.