Browse Source

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

v0.7.4-release
Aaron Heckmann 15 years ago
committed by Ryan Dahl
parent
commit
8f52142116
  1. 2
      lib/multipart.js

2
lib/multipart.js

@ -183,7 +183,7 @@ Part.prototype.write = function(chunk) {
var header = this.buffer.substr(0, offset).split(/: ?/); var header = this.buffer.substr(0, offset).split(/: ?/);
this.headers[header[0].toLowerCase()] = header[1]; this.headers[header[0].toLowerCase()] = header[1];
this.buffer = this.buffer.substr(offset+2); this.buffer = this.buffer.substr(offset+2);
} else if (offset === false) { } else if (offset === -1) {
return; return;
} }
} }

Loading…
Cancel
Save