Best practices for automatically removing spaces from keys...

Brad Fitzpatrick brad at danga.com
Thu Nov 18 13:39:10 PST 2004


I had mostly finished a new protocol mode that fixed this issue, but in
the meantime it might be safest to just fail client-side if they have a
space in their key.


On Thu, 18 Nov 2004, Sean Chittenden wrote:

> I'm curious what people think the best practices are regarding spaces
> in keys.  In libmemcache(3), I pass spaces right through to the wire
> and am not too terribly happy about that.  What is the best
> alternative?  I'm thinking that replacing it with '_' would be more
> appropriate, or even (char)254 since that should fail isspace(3) and
> would be reasonably unique enough to allow (char)254 to be mapped back
> to a space (yeah, I know non-ascii keys will break, but...).  Thoughts?
>
> -sc
>
> --
> Sean Chittenden
>
>


More information about the memcached mailing list