ngx_http_complex_value VS ngx_http_script

Sergey Petrov sergey.siroezhkin at
Wed Feb 22 16:36:07 UTC 2012

Thanks a lot for this explicit explanation!

On Wed, Feb 22, 2012 at 6:29 PM, Maxim Dounin <mdounin at> wrote:
> Hello!
> On Wed, Feb 22, 2012 at 02:30:46PM +0400, Sergey Petrov wrote:
>> Hi,
>> can somone explain the difference? What's the correct usecase for
>> ngx_http_script?
> The complex value is basically a simplified envelope for script
> functionality for a simple case of a single string with (optional)
> variables.
> In most cases (unless you are targeting your code for old nginx
> versions) a complex value will be ok for you.  Note complex values
> were introduced relatively recently, so in many cases nginx code
> still uses script directly.
> There are also some specific situations though, when you may need
> to use script functionality directly.  E.g. proxy module will do
> this when evaluating proxy_set_header directives, as this allows
> flush uncacheable variables only once.
> Maxim Dounin
> _______________________________________________
> nginx-devel mailing list
> nginx-devel at

More information about the nginx-devel mailing list