Skip to content

Commit

Permalink
look for -1 instead of false returned from string.indexOf
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Heckmann authored and ry committed Feb 3, 2010
1 parent 173a8c9 commit 8f52142
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/multipart.js
Expand Up @@ -183,7 +183,7 @@ Part.prototype.write = function(chunk) {
var header = this.buffer.substr(0, offset).split(/: ?/);
this.headers[header[0].toLowerCase()] = header[1];
this.buffer = this.buffer.substr(offset+2);
} else if (offset === false) {
} else if (offset === -1) {
return;
}
}
Expand Down

0 comments on commit 8f52142

Please sign in to comment.