Welcome! Log In Create A New Profile

Advanced

Making rewrite a non-static function

Marcus Clyne
March 18, 2009 06:19PM
Hi,

Is there an easy way to set a variable that uses captures from within
another module?

I'm trying to set my own variable that as part of the setup, creates a
variable that may or may not use a variable (depending on the setting).
Rather than using the 'set' directive, I would like to create my own
directive to determine whether I need a variable or not. However, if I
do, I would like to be able to use all the functionality of other variables.

The easiest way I see for doing this, would be to call the
ngx_http_rewrite_set from my own module, if needs be, but it is
currently a static function.

If it is not currently possible, Igor, could you possible make
ngx_http_rewrite_set (and possibly other modular functions that might be
useful) a non-static var and add it to one of the headers files (e.g.
ngx_http.h)? Alternatively, how about adding a public function to make
it easy for developers to add variables that use captures from within
their modules and making that a public function instead of the default
configuration one? I'm happy to write this function if you'd include it
in the source. I would have thought it would only need to be a few lines.

Thanks,

Marcus.
Subject Author Posted

Making rewrite a non-static function

Marcus Clyne March 18, 2009 06:19PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 85
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready