Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

empty strings should be allowed with %b #10

Closed
nicolasff opened this issue Nov 21, 2010 · 1 comment
Closed

empty strings should be allowed with %b #10

nicolasff opened this issue Nov 21, 2010 · 1 comment

Comments

@nicolasff
Copy link
Contributor

Empty strings cause the command builder to create an invalid request.

    /* Set a key using binary safe API */
    reply = redisCommand(c,"SET %b %b", "foo", 3, "", 0);
    printf("SET (binary API): %s\n", reply->str);
    freeReplyObject(reply);

Responds with:

SET (binary API): ERR wrong number of arguments for 'set' command

The following command is generated and sent:

*2
$3
SET
$3
foo

This issue was discovered whilst porting phpredis to a hiredis backend; a unit test failed.

@pietern
Copy link
Contributor

pietern commented Nov 22, 2010

Thanks for the report. This is now fixed on master.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants