From 3ac7d318bf6d88af6581d9be51fd2da314d376f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCrg=C3=BCn=20Day=C4=B1o=C4=9Flu?= Date: Thu, 24 Aug 2023 09:52:33 +0300 Subject: [PATCH] check for boundary --- lib/types/multipart.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/types/multipart.js b/lib/types/multipart.js index eebaa26..834769f 100644 --- a/lib/types/multipart.js +++ b/lib/types/multipart.js @@ -272,7 +272,7 @@ function Multipart (boy, cfg) { Multipart.prototype.write = function (chunk, cb) { let r if ((r = this.parser.write(chunk)) && !this._pause) { - if (this._boundaryNotFound && (this._nparts !== 0 || chunk.includes(this._boundary))) { + if (this._boundaryNotFound && (this._nparts !== 0 || chunk.includes(`--${this._boundary}--`))) { this._boundaryNotFound = false } cb()