perl help
Igor Sysoev
is at rambler-co.ru
Fri Feb 6 13:23:23 MSK 2009
On Fri, Feb 06, 2009 at 01:12:50PM +0300, Igor Sysoev wrote:
> On Fri, Feb 06, 2009 at 11:16:02AM +1030, kingsley at internode.com.au wrote:
>
> > Great that mostly helped however
> >
> >
> > if ($arg_bitstart && $arg_bitstart != 0){
> > proxy_set_header Content-Range
> > bytes=$arg_bitstart-;
> > proxy_set_header Range
> > bytes=$arg_bitstart-;
> > }
> >
> > I get this error
> >
> > 2009/02/06 11:12:38 [emerg] 31739#0: invalid condition "$arg_bitstart" in
> > /etc/nginx/nginx.conf:111
> > 2009/02/06 11:12:38 [emerg] 31739#0: the configuration file
> > /etc/nginx/nginx.conf test failed
>
> nginx curerently does not support "&&", etc inside "if".
>
> However, in this case
>
> if ($arg_bitstart) {
>
> is enough as both "" and "0" are false.
> The more stronger test is:
>
> if ($arg_bitstart ~ [1-9]\d+) {
- if ($arg_bitstart ~ [1-9]\d+) {
+ if ($arg_bitstart ~ ^[1-9]\d+$) {
--
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list