Mercurial > hg > nginx
diff src/http/ngx_http_header_filter_module.c @ 4637:668ab1a21327
Zero padded the returned and logged HTTP status code, and fixed possible
buffer overrun in $status handling.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Wed, 16 May 2012 13:27:04 +0000 |
parents | d11f86a16e3b |
children | 4c415af7dbc2 |
line wrap: on
line diff
--- a/src/http/ngx_http_header_filter_module.c +++ b/src/http/ngx_http_header_filter_module.c @@ -445,7 +445,7 @@ ngx_http_header_filter(ngx_http_request_ b->last = ngx_copy(b->last, status_line->data, status_line->len); } else { - b->last = ngx_sprintf(b->last, "%ui", status); + b->last = ngx_sprintf(b->last, "%03ui", status); } *b->last++ = CR; *b->last++ = LF;