# HG changeset patch # User Ruslan Ermilov # Date 1335249312 0 # Node ID aed015c3deddcc88574c5bbc454c3774a1b692eb # Parent 6520338cdf0a4dfa10e708f08130622047ba054d Documented URI normalization rules, including %-decoding. Aligned the description of the $uri variable accordingly. diff -r 6520338cdf0a -r aed015c3dedd xml/en/docs/http/ngx_http_core_module.xml --- a/xml/en/docs/http/ngx_http_core_module.xml Tue Apr 24 06:21:34 2012 +0000 +++ b/xml/en/docs/http/ngx_http_core_module.xml Tue Apr 24 06:35:12 2012 +0000 @@ -1288,6 +1288,18 @@ Sets a configuration based on a request URI. + + + +The matching is performed against a normalized URI, +after decoding a text encoded in the “%XX” form, +resolving references to relative path components “.” +and “..”, and possible +compression of two or more +adjacent slashes into a single slash. + + + A location can either be defined by a prefix string, or by a regular expression. Regular expressions are specified by prepending them with the “~*” prefix (for case-insensitive matching), or with the @@ -2808,10 +2820,10 @@ $uri -current URI in request +current URI in request, normalized -It may differ from an original, e.g. when doing internal redirects, -or when using index files. +The value of $uri may change during request processing, +e.g. when doing internal redirects, or when using index files. diff -r 6520338cdf0a -r aed015c3dedd xml/ru/docs/http/ngx_http_core_module.xml --- a/xml/ru/docs/http/ngx_http_core_module.xml Tue Apr 24 06:21:34 2012 +0000 +++ b/xml/ru/docs/http/ngx_http_core_module.xml Tue Apr 24 06:35:12 2012 +0000 @@ -1271,6 +1271,18 @@ Устанавливает конфигурацию в зависимости от URI запроса. + + + +Для сопоставления используется URI запроса в нормализованном виде, +после декодирования текста, заданного в виде “%XX”, +преобразования относительных элементов пути “.” и +“..” в реальные, и возможной +замены двух и более подряд идущих +слэшей на один. + + + location можно задать префиксной строкой или регулярным выражением. Регулярные выражения задаются либо с префиксом “~*” (для поиска совпадения без учёта регистра символов), @@ -1427,7 +1439,7 @@ Разрешает или запрещает преобразование URI путём замены двух и более подряд -идущих слэшей (“/”) в один. +идущих слэшей (“/”) на один. @@ -2790,10 +2802,11 @@ $uri -текущий URI запроса +текущий URI запроса в нормализованном виде -Он может отличаться от первоначального, например, при внутренних -перенаправлениях или при использовании индексных файлов. +Значение $uri может изменяться в процессе обработки запроса, +например, при внутренних перенаправлениях +или при использовании индексных файлов.