Memcached module and lowercase keys

I talked to someone on the Nginx forums the other day who had posted a
(patch) and I came back today to get it and noticed the forums had been
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
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!

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->;
  •   // strlower key
  •   ngx_strlow(ctx->, ctx->, ctx->key.len);
  • ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
                   "http memcached request: \"%V\"", &ctx->key);

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs