mirror of https://github.com/nodejs/node.git
look for -1 instead of false returned from string.indexOf
parent
173a8c9842
commit
8f52142116
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue