killme2008 / xmemcached

High performance, easy to use multithreaded memcached client in java.
http://fnil.net/xmemcached
Apache License 2.0
757 stars 280 forks source link

java.lang.IllegalArgumentException: Key contains invalid characters #109

Closed davidkarlsen closed 4 years ago

davidkarlsen commented 4 years ago

I have a key like: [1234, 00123456789] which raises:

java.lang.IllegalArgumentException: Key contains invalid characters:  [1234, 00123456789]
                at net.rubyeye.xmemcached.utils.ByteUtils.checkKey(ByteUtils.java:139)

I checked https://github.com/killme2008/xmemcached/blob/xmemcached-2.4.6/src/main/java/net/rubyeye/xmemcached/utils/ByteUtils.java#L139 - why are these chars illegal?

davidkarlsen commented 4 years ago

OK, I guess reason is: https://github.com/memcached/memcached/blob/master/doc/protocol.txt#L41