1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00

Fix: do not stop parsing a chunk if the first character is a line break

Add changelog entry
This commit is contained in:
Ruben Bridgewater
2015-10-27 11:13:43 +01:00
parent 9b3b090119
commit 5d08132f7c
3 changed files with 7 additions and 8 deletions

View File

@@ -117,9 +117,7 @@ JavascriptReplyParser.prototype.execute = function (buffer) {
offset = this._offset - 1;
this.send_reply(this._parseResult(type));
} else if (type === 10 || type === 13) {
break;
} else {
} else if (type !== 10 && type !== 13) {
var err = new Error('Protocol error, got "' + String.fromCharCode(type) + '" as reply type byte');
this.send_error(err);
}