twitter/finagle — pull request #245 by zhanggl (2014-02-24 07:03:15+00:00)
Title: fixed bug(#244): Allow an empty string as a hash field value

Motivations:
To fix the bug #244 according to RESP at http://redis.io/topics/protocol

Modifications:

1. Encoding
In Codec.scala, we allow "" to be encoded as a normal argument by removing the if guard on (arg.readableBytes == 0)

2. Decoding
In Reply.scala, decode '$0\r\n\r\n' to a BulkReply of "" instead of a EmptyBulkReply. Also removed the requirement of a BulkRelay not allowed to have "" as payload (Though I am not quite sure about the side-effect ).

3. And the tests in both NaggatiSpec.scala and ClientSpec.scala

Results:
The tests in NaggatiSpec.scala and ClientSpec.scala passed. And now we can have the empty string as the hash field value.