[dev] more permissive ngx_http_variables_init_vars
manlio_perillo at libero.it
Fri Jan 11 18:13:36 MSK 2008
I have written a module that make available some "undeclared" variables,
using the same method used for `http_`, `sent_http_` and
These variables have prefix `cookie_` and `args_`.
As an example:
returns the value of the cookied named "name".
Unfortunately, my module does not works without a patch to nginx (the
patch is attached.
The patch is very simple: instead of returning an error when an "unknow"
variable is seen, it first checks if it has a get_handler attached.
These variables are still "second class citizen", since they are not
supported by the `ngx_http_get_variable` function (this function is
used by the SSI module, and may be used by a perl handler).
This is not a problem; moreover I can add directives for explicitly
declare these variables:
will add the `cookie_name` variable.
Igor, what I would like to know is if the patch is correct and if it is
possible to have it integrated in nginx.
Thanks Manlio Perillo
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 390 bytes
Desc: not available
More information about the nginx