ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rewrite + proxy



29.08.2008 12:09, Denis F. Latypoff wrote:
Hello Igor,

    Никогда не думал, что столкнусь с такой проблемой:

        upstream mod_perl {
            server   192.168.12.10:8100;
        }

        location   /article/ {
            rewrite    ^/article/(.*)
                        /article.html?name=$1
                        break;
            proxy_pass http://mod_perl;
        }

посылаем запрос:

GET /article/%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4 HTTP/1.1

в логах nginx:

2008/08/28 14:58:19 [debug] 25550#0: *99 http request line: "GET 
/article/%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4 HTTP/1.1"
2008/08/28 14:58:19 [debug] 25550#0: *99 http uri: "/article/Юникод"
2008/08/28 14:58:19 [debug] 25550#0: *99 http args: ""
2008/08/28 14:58:19 [debug] 25550#0: *99 http exten: ""
2008/08/28 14:58:19 [debug] 25550#0: *99 http process request header line
...
2008/08/28 14:58:19 [debug] 25550#0: *99 http proxy header:
"GET /article.html?name=Юникод HTTP/1.0
...

в mod_perl распечатываем запрос:

sub handler
{
    my $r = shift;

    require Apache2::RequestRec;
    print STDERR $r->the_request, "\n";
}

получаем:

GET /article.html?name=Юникод HTTP/1.0

Хотелось бы получить

GET /article.html?name=%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4 HTTP/1.0

Как?


http://www.lexa.ru/nginx-ru/msg18790.html похоже то же самое



 




Copyright © Lexa Software, 1996-2009.