$memcached_key doesn't fetch unicode url

kirpit kirpit at gmail.com
Sun May 4 15:42:39 UTC 2014


I'm doing some sort of downstream cache that I save every entire page into
memcached from the application with urls such as:


then I'm fetching them from nginx if available with the config:
    location / {
        # try to fetch from memcached
        set                 $memcached_key "$host$request_uri";
        memcached_pass      localhost:11211;
        expires             10m;
        # not fetched from memcached, fallback
        error_page          404 405 502 = @fallback;

This works perfectly fine for latin char urls. However, it fails to catch
unicode urls such as:


The unicode char "%C4%B0" appears same in the nginx logs, application cache
setting key (that is actually taken from raw REQUEST_URI what nginx gives).

The example url content also exist in the memcached itself when if I try:

However, nginx cannot fetch anything from memcached, @fallbacks every time.

I'm using version 1.6.0. Any help is much appreciated.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20140504/b32c9ace/attachment.html>

More information about the nginx mailing list