summaryrefslogtreecommitdiffstats
path: root/usr.sbin/nginx/src/http/modules/ngx_http_log_module.c
diff options
context:
space:
mode:
authorrobert <robert@openbsd.org>2012-07-07 16:01:48 +0000
committerrobert <robert@openbsd.org>2012-07-07 16:01:48 +0000
commit804b71a0609acb5f92f9dcddca7d9200130484d9 (patch)
treef00c8fb2d42c998ec27b6b9b0c899f878c118d15 /usr.sbin/nginx/src/http/modules/ngx_http_log_module.c
parentadd /var/www/cache for nginx to store some data (diff)
downloadwireguard-openbsd-804b71a0609acb5f92f9dcddca7d9200130484d9.tar.xz
wireguard-openbsd-804b71a0609acb5f92f9dcddca7d9200130484d9.zip
update to 1.2.2 and start using /var/www/cache instead of /var/www/tmp
Diffstat (limited to 'usr.sbin/nginx/src/http/modules/ngx_http_log_module.c')
-rw-r--r--usr.sbin/nginx/src/http/modules/ngx_http_log_module.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_log_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_log_module.c
index 2d412853bd9..edb145992a6 100644
--- a/usr.sbin/nginx/src/http/modules/ngx_http_log_module.c
+++ b/usr.sbin/nginx/src/http/modules/ngx_http_log_module.c
@@ -205,7 +205,7 @@ static ngx_http_log_var_t ngx_http_log_vars[] = {
{ ngx_string("msec"), NGX_TIME_T_LEN + 4, ngx_http_log_msec },
{ ngx_string("request_time"), NGX_TIME_T_LEN + 4,
ngx_http_log_request_time },
- { ngx_string("status"), 3, ngx_http_log_status },
+ { ngx_string("status"), NGX_INT_T_LEN, ngx_http_log_status },
{ ngx_string("bytes_sent"), NGX_OFF_T_LEN, ngx_http_log_bytes_sent },
{ ngx_string("body_bytes_sent"), NGX_OFF_T_LEN,
ngx_http_log_body_bytes_sent },
@@ -584,16 +584,13 @@ ngx_http_log_status(ngx_http_request_t *r, u_char *buf, ngx_http_log_op_t *op)
status = r->headers_out.status;
} else if (r->http_version == NGX_HTTP_VERSION_9) {
- *buf++ = '0';
- *buf++ = '0';
- *buf++ = '9';
- return buf;
+ status = 9;
} else {
status = 0;
}
- return ngx_sprintf(buf, "%ui", status);
+ return ngx_sprintf(buf, "%03ui", status);
}