More permissive ngx_http_variables_init_vars


I have written a module that make available some “undeclared” variables,
using the same method used for http_, sent_http_ and
upstream_http_ variables.

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:
parsed_cookie_set name;
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 P.