We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c35d3c commit 30a9c9fCopy full SHA for 30a9c9f
src/Component.ts
@@ -22,7 +22,7 @@ export class Component implements Part {
22
* @param data Component byte representation to parse
23
*/
24
public static parse(data: Uint8Array): Component {
25
- const hasHeaders = Multipart.findSequenceIndex(data, Multipart.CRLF) !== 0;
+ const hasHeaders = !(data[0] === Multipart.CR && data[1] === Multipart.LF);
26
const headersEndIndex = hasHeaders ? Multipart.findSequenceIndex(data, Multipart.combineArrays([Multipart.CRLF, Multipart.CRLF])) + 2 : 0;
27
28
const headersBuffer = data.slice(0, headersEndIndex);
0 commit comments