Memcached module and lowercase keys

I talked to someone on the Nginx forums the other day who had posted a
solution
(patch) and I came back today to get it and noticed the forums had been
switched
to something else so the post was gone.

He (if you’re out there) had modified it to lowercase all keys passed in
so that
you could guarantee no matter what the case of the URL that it would
find the
correct key, and then on the program side we would lowercase all strings
before
storing them.

If you are out there reading this, can you put the code up on the
mailing list
here, or email me at jturmel at gmail dot com with it.

Thank you!
Josh

Got this working with the following on 0.7.44:

*************** ngx_http_memcached_create_request(ngx_ht
*** 280,285 ****
— 281,289 ----

  ctx->key.len = b->last - ctx->key.data;
  •   // strlower key
    
  •   ngx_strlow(ctx->key.data, ctx->key.data, ctx->key.len);
    
  • ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
                   "http memcached request: \"%V\"", &ctx->key);