# HG changeset patch # User Homutov Vladimir # Date 1363600753 -14400 # Node ID 17d0c825f0984dcc245a4e127f03df774edca01b # Parent 20a50f7bcbd6ac460fc1baa4e39f68833ee48446 Revised the userid module documentation. - added the "embedded variables" section; - documented the "$uid_reset" variable; - documented default parameters of "userid_expires", "userid_mark" and "userid_p3p" directives; - improved descriptions of "userid_mark" and "userid_service" directives. diff --git a/xml/en/docs/http/ngx_http_userid_module.xml b/xml/en/docs/http/ngx_http_userid_module.xml --- a/xml/en/docs/http/ngx_http_userid_module.xml +++ b/xml/en/docs/http/ngx_http_userid_module.xml @@ -10,7 +10,7 @@ + rev="3">
@@ -18,7 +18,8 @@ The ngx_http_userid_module module sets cookies suitable for client identification. Received and set cookies can be logged using the embedded variables -$uid_got and $uid_set. +$uid_got and +$uid_set. This module is compatible with the mod_uid module for Apache. @@ -105,35 +106,50 @@ The parameter none di -time | max - +time | max | + off +off http server location Sets a time during which a browser should keep the cookie. -The parameter max sets the time to +The parameter max will cause the cookie to expire on “31 Dec 2037 23:55:55 GMT”. This is the maximum time understood by old browsers. +The parameter off will cause the cookie to expire at +the end of a browser session. -off | letter | digit | = + + letter | digit | + = | + off off http server location -Sets the first symbol of the cookie’s representation base64 tail -(“==” by default) and resets all accepted cookies -with another tail. -It may be useful if it's required to add or change the P3P or the cookie expire -time and leave the internally encoded value unchanged. +If parameter is not off, enables the cookie marking +mechanism and sets a character used as a mark. +This mechanism allows to add or change + and/or cookie expiration time while +preserving the client identifier. +The mark can be any letter of the English alphabet (case-sensitive), +digit, or the “=” character. + + + +If a mark is set, it is compared with the first padding symbol +in the base64 representation of client identifier passed in a cookie. +If they do not match, a cookie is resent with the specified mark, +expiration time and a
P3P
header.
@@ -154,8 +170,8 @@ Sets a cookie name. -string - +string | none +none http server location @@ -163,6 +179,8 @@ Sets a cookie name. Sets a value for the
P3P
header field that will be sent along with a cookie. +If set to the special value none, +the
P3P
header will not be sent in a response.
@@ -190,13 +208,48 @@ Defines a path for which the cookie is s location -Identifies the service that set a cookie. +If identifiers are issued by multiple servers (services), +each service should be assigned its own number +in order to ensure that client identifiers are unique. For version 1 cookies the default value is zero. -For version 2 cookies the default value is an IP address of the server. +For version 2 cookies this is the number composed from the last four +octets of the server’s IP address.
+ +
+ + +The ngx_http_userid_module module +supports the following embedded variables: + + +$uid_got + +The cookie name and received client identifier. + + +$uid_reset + +If set to a non-empty string, and it is not “0”, +client identifiers are reset. +The special value “log” additionally leads to the output of +messages about reset identifiers to the +. + + +$uid_set + +The cookie name and sent client identifier. + + + + + +
+
diff --git a/xml/ru/docs/http/ngx_http_userid_module.xml b/xml/ru/docs/http/ngx_http_userid_module.xml --- a/xml/ru/docs/http/ngx_http_userid_module.xml +++ b/xml/ru/docs/http/ngx_http_userid_module.xml @@ -10,7 +10,7 @@ + rev="3">
@@ -18,7 +18,8 @@ Модуль ngx_http_userid_module выдаёт куки для идентификации клиентов. Для записи в лог полученных и выданных кук можно использовать встроенные -переменные $uid_got и $uid_set. +переменные $uid_got и +$uid_set. Модуль совместим с модулем mod_uid для Apache. @@ -105,33 +106,50 @@ userid_p3p 'policyref="/w3c/p3p.xml" -время | max - +время | max | + off +off http server location Задаёт время, в течение которого браузер должен хранить куку. -Параметр max задаёт время 31 декабря 2037 года 23:55:55 GMT. +Параметр max устанавливает срок хранения куки до +31 декабря 2037 года 23:55:55 GMT. Это максимальное время, которое понимают старые браузеры. +Указание параметра off позволяет ограничить время +действия куки сессией браузера. -off | буква | цифра | = + + буква | цифра | + = | + off off http server location -Задаёт первый символ хвоста base64 (по умолчанию “==”) -представления куки и перевыдаёт все принятые куки, у которых этот хвост другой. -Это полезно, если необходимо добавить или поменять P3P или время -хранения куки, но при этом оставить неизменным закодированное внутри число. +Если параметр не off, включает механизм маркировки кук +и задаёт символ, используемый в качестве метки. +Этот механизм позволяет добавить или изменить + и/или время хранения куки, но при этом оставить +неизменным идентификатор клиента. +Меткой может быть любая буква английского алфавита (с учётом регистра), +цифра или знак “=”. + + + +Если метка задана, то она сравнивается с первым дополняющим символом +в base64 представлении идентификатора клиента, передаваемом в куке. +Если они не совпадают, то кука перепосылается с заданной меткой, +временем хранения и заголовком
P3P
.
@@ -152,15 +170,17 @@ userid_p3p 'policyref="/w3c/p3p.xml" -строка - +строка | none +none http server location -Задаёт значение для поля заголовка
P3P
, который будет +Задаёт значение для поля заголовка
P3P
, которое будет выдаваться вместе с кукой. +Если задано специальное значение none, +то в ответе не будет заголовка
P3P
.
@@ -181,20 +201,55 @@ userid_p3p 'policyref="/w3c/p3p.xml" -число +номер IP-адрес сервера http server location -Задаёт номер сервиса, выдавшего куку. -По умолчанию для куки первой версии используется ноль, -а для второй — IP-адрес сервера. +Если идентификаторы выдаются несколькими серверами (сервисами), +то каждому сервису следует назначить свой собственный номер, +для обеспечения уникальности выдаваемых идентификаторов клиентов. +По умолчанию для кук первой версии используется ноль. +Для кук второй версии это число, составленное из последних четырёх +октетов IP-адреса сервера.
+ +
+ + +Модуль ngx_http_userid_module +поддерживает следующие встроенные переменные: + + +$uid_got + +Имя куки и полученный идентификатор клиента. + + +$uid_reset + +Если значением является непустая строка не равная “0”, +то клиентские идентификаторы перевыдаются. +Специальное значение “log” дополнительно приводит к выдаче +сообщений о перевыданных идентификаторах в +. + + +$uid_set + +Имя куки и выданный идентификатор клиента. + + + + + +
+