Forum: NGINX Memcached module and lowercase keys

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
1f63dadb857637a35df3fa553f67a5a7?d=identicon&s=25 jturmel (Guest)
on 2009-03-25 06:56
(Received via mailing list)
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
1f63dadb857637a35df3fa553f67a5a7?d=identicon&s=25 jturmel (Guest)
on 2009-03-26 18:15
(Received via mailing list)
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);
This topic is locked and can not be replied to.