Skip to content

Commit

Permalink
Fixed multipart/form-data request was not ending with \r\n. (#999)
Browse files Browse the repository at this point in the history
This issue caused that CGI server did not get file payload.
  • Loading branch information
MaximkaHuman authored Jun 21, 2022
1 parent fe0256d commit 9d2a899
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/httpRequestParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export class HttpRequestParser implements RequestParser {
combinedStream.append(line);
}

if (index !== lines.length - 1) {
if (index < lines.length) {
combinedStream.append(this.getLineEnding(contentTypeHeader));
}
}
Expand Down

0 comments on commit 9d2a899

Please sign in to comment.