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 committed Jan 31, 2010
1 parent 704f394 commit 68f6231
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 68f6231

Please sign in to comment.