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

fix: geo units must be lowercase up to Redis v7 #1654

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rhysbalevicius
Copy link

@rhysbalevicius rhysbalevicius commented Sep 16, 2022

Prior to Redis v7 various geo commands supported a case sensitive "unit" parameter (in Redis v7 and above it is case-insensitive). In particular, for clients running v6.2.7 and below the units m, km, ft, mi must be lowercase, or else an error is thrown: ERR unsupported unit provided. please use m, km, ft, mi.

While this is true for several geo-like commands it appears that in this library only the geodist command explicitly types this parameter. However, the units here are specified to be uppercase which is incompatible with older versions. Since v7+ is case insensitive, this PR proposes to use lowercase for the sake of compatibility.

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

Successfully merging this pull request may close these issues.

None yet

1 participant