Skip to content

Commit

Permalink
check for boundary
Browse files Browse the repository at this point in the history
  • Loading branch information
gurgunday committed Aug 24, 2023
1 parent 883124b commit 3ac7d31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/types/multipart.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 3ac7d31

Please sign in to comment.