Welcome! Log In Create A New Profile

Advanced

Re: Can not use $bytes_sent in module (complex values)

Maxim Dounin
September 20, 2012 03:54AM
Hello!

On Thu, Sep 20, 2012 at 03:43:20AM +0400, Vladimir Shebordaev wrote:

> Wed, 19 Sep 2012 23:11:57 +0200 от Benjamin Grössing <mailtogroe@gmail.com>:
> >2012/9/20 Benjamin Grössing <mailtogroe@gmail.com>:
> >
> >Hi Vladimir, hi Maxim!
> >
> >Thanks for your answers. I've had a look at the rewrite module -
> >unfortunately it does not support the $bytes_sent variable either as
> >configuring "if ($bytes_sent) { }" throws the error: [emerg] unknown
> >"bytes_sent" variable.
> Yes, this is what the indexed variables are. They have no name
> at runtime and accessed by the index into the request->variables
> array by the script engine that is to evaluate a complex value
> and if conditionals. This is faster to do, since it helps to
> avoid the cmcf->variables_hash lookup and a memory allocation at
> evaluation time having the space for the value reserved at the
> request initialization time. But the index value must be known
> to the rewrite module at the configuration time.

No. The $bytes_sent variable isn't actually variable at all: it's
only available in log module via it's own machinery, not as a
generic variable. It's completely unrelated to indexed variables
access.

[...]

Maxim Dounin

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Can not use $bytes_sent in module (complex values)

Benjamin Grössing 1153 September 18, 2012 09:58AM

Re: Can not use $bytes_sent in module (complex values)

Vladimir Shebordaev 486 September 18, 2012 11:58AM

Re: Can not use $bytes_sent in module (complex values)

Maxim Dounin 458 September 18, 2012 08:08PM

Re: Can not use $bytes_sent in module (complex values)

Benjamin Grössing 423 September 19, 2012 05:14PM

Re: Can not use $bytes_sent in module (complex values)

Maxim Dounin 460 September 20, 2012 04:06AM

Re: Can not use $bytes_sent in module (complex values)

Vladimir Shebordaev 532 September 19, 2012 07:44PM

Re: Can not use $bytes_sent in module (complex values)

Maxim Dounin 488 September 20, 2012 03:54AM

Re: Can not use $bytes_sent in module (complex values)

Vladimir Shebordaev 446 September 21, 2012 04:18AM

Re: Can not use $bytes_sent in module (complex values) Attachments

Benjamin Grössing 513 September 27, 2012 11:32AM

Re: Can not use $bytes_sent in module (complex values)

Vladimir Shebordaev 478 September 30, 2012 12:20AM

Re: Can not use $bytes_sent in module (complex values)

Maxim Dounin 532 October 03, 2012 11:30AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 226
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready