Skip to content

Commit 9d2a899

Browse files
authored
Fixed multipart/form-data request was not ending with \r\n. (#999)
This issue caused that CGI server did not get file payload.
1 parent fe0256d commit 9d2a899

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/httpRequestParser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ export class HttpRequestParser implements RequestParser {
216216
combinedStream.append(line);
217217
}
218218

219-
if (index !== lines.length - 1) {
219+
if (index < lines.length) {
220220
combinedStream.append(this.getLineEnding(contentTypeHeader));
221221
}
222222
}

0 commit comments

Comments
 (0)