-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fix for multi operations with detect_buffers enabled #471
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
Conversation
Hi @jezell thank you for submitting! Think you could write up a couple tests in https://github.com/mranney/node_redis/blob/master/test.js to verify the patch works? Thanks! |
Sure thing |
+1 |
just got bit by this -- 👍 👍 👍 👍 👍 👍 👍 👍 👍 👍 |
@brycebaril, I wrote them, check the pull request #517. |
Ahh, after spending some time reading the code I see an issue here -- it is incompatible with the hiredis (or other) parsers. We'll need to look for a way to either do this enitrely in the parser, or entirely in the library. The parser tacking on data onto the Buffer and then using that data in the library creates a significant API change for parsers. |
…h hiredis parser behavior
Setting the redisType value on the buffer was only needed to return integers as buffers. Looks like hiredis won't ever return a buffer unless the result is a string. Updated javascript parser so the behavior matches and removed the extra data from the buffer obj. |
@jezell the parser part seems to still be needed. Would you mind rebasing? |
This fixes #263 where multi operations that properly should return arrays, return strings instead when detect_buffers: true.