Skip to content

Removing trailing space after a command if there are no arguments. #311

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

Merged
merged 4 commits into from
Apr 14, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pymemcache/client/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,8 @@ def _fetch_cmd(self, name, keys, expect_cas):
remapped_keys = dict(zip(prefixed_keys, keys))

# It is important for all keys to be listed in their original order.
cmd = name + b' ' + b' '.join(prefixed_keys) + b'\r\n'
# For Memcached Protocol correctness, if the list of prefixed_keys is empty, the name of the command will be immediately followed by the end of line.
cmd = name + b' ' + b' '.join(prefixed_keys) + b'\r\n' if prefixed_keys else name + b'\r\n'

try:
if self.sock is None:
Expand Down