2 messages in ru.sysoev.nginxngx_parse_time not handling seconds f...
FromSent OnAttachments
Mike SmithJan 27, 2009 7:29 pm 
Igor SysoevJan 27, 2009 10:42 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:ngx_parse_time not handling seconds flag properly?Actions...
From:Mike Smith (mi@mdms.org)
Date:Jan 27, 2009 7:29:35 pm
List:ru.sysoev.nginx

It looks to me like ngx_parse_time is scaling to seconds when you don't want it and not scaling when you do. When called from ngx_conf_set_msec_slot, it scales all msec values up by a factor of 1000, so if I want a timeout of 180ms I actually get a timeout of 180s.

Can anyone comment on this.

Thanks, Mike

Index: src/core/ngx_parse.c =================================================================== --- src/core/ngx_parse.c (.../tags/nginx-0.7.32) (revision 15961) +++ src/core/ngx_parse.c (.../trunk/nginx) (revision 15961) @@ -115,7 +115,7 @@ ngx_parse_time(ngx_str_t *line, ngx_uint_t sec) value = 0; total = 0; step = sec ? st_start : st_month; - scale = sec ? 1 : 1000; + scale = sec ? 1000 : 1;

p = line->data; last = p + line->len;