Re: ngx_http_upstream_status_variable question

2016-07-20 Thread gaoyan09
figure it out, would jump one position for 3 bytes separator Posted at Nginx Forum: https://forum.nginx.org/read.php?2,268369,268379#msg-268379 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: ngx_http_upstream_status_variable question

2016-07-20 Thread gaoyan09
also ngx_http_upstream_response_time_variable and ngx_http_upstream_response_length_variable, + 2 for separator if (state[i].peer) { *p++ = ','; *p++ = ' '; } else { *p++ = ' '; *p++ = ':'; *p++ = ' '; if (++i == r->

ngx_http_upstream_status_variable question

2016-07-20 Thread gaoyan09
ngx_http_upstream_status_variable len = r->upstream_states->nelts * (3 + 2); write status to string, one status str len would be 3 in most case, like 200, 302, 404 but if upstream multi times, may be add ' : ' as separator so, string len may be nelts*3 + (nelts-1)*3 = 6nelts - 3 != nelts * (