look for -1 instead of false returned from string.indexOf

pull/22966/head
Aaron Heckmann 2010-01-30 23:41:22 -05:00 committed by Ryan Dahl
parent 173a8c9842
commit 8f52142116
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}
}