Skip to content

Commit

Permalink
Merge pull request #27 from jaythakor-ai/jay-thakor/large-request-pay…
Browse files Browse the repository at this point in the history
…load-chunk-issue

Handled large payload size for post request
  • Loading branch information
endel committed Jul 21, 2023
2 parents cd441dc + aec23a2 commit 089a5d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/IncomingMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export class IncomingMessage extends EventEmitter implements http.IncomingMessag

this.res.onData((arrayBuffer, isLast) => {
const chunk = Buffer.from(arrayBuffer);
body = (body && body.length !== 0) ? Buffer.concat([body, chunk]) : chunk;
body = (body && body.length !== 0) ? Buffer.concat([body, chunk]) : Buffer.concat([chunk]);

if (isLast) {
clearTimeout(rejectionTimeout);
Expand Down

0 comments on commit 089a5d7

Please sign in to comment.