fix: memcached VERSION is now parseable by php-memcached client (#2220)

The DF version is being unparseable by Memcached::getVersion() that expects n.n.n string.
Change the version to emulate the old memcached server.
The DF version can still be fetched via Memcached::getStats() function.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
Roman Gershman 2023-11-27 20:54:00 +02:00 committed by GitHub
parent 3f7e42b099
commit b853b2ab00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View file

@ -1335,7 +1335,7 @@ void Service::DispatchMC(const MemcacheParser::Command& cmd, std::string_view va
server_family_.StatsMC(cmd.key, cntx);
return;
case MemcacheParser::VERSION:
mc_builder->SendSimpleString(StrCat("VERSION ", kGitTag));
mc_builder->SendSimpleString("VERSION 1.5.0 DF");
return;
default:
mc_builder->SendClientError("bad command line format");