aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_special_response.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/ngx_http_special_response.c')
-rw-r--r--src/http/ngx_http_special_response.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c
index d4c39ff65..9de0d15aa 100644
--- a/src/http/ngx_http_special_response.c
+++ b/src/http/ngx_http_special_response.c
@@ -25,6 +25,13 @@ static u_char ngx_http_error_full_tail[] =
;
+static u_char ngx_http_error_build_tail[] =
+"<hr><center>" NGINX_VER_BUILD "</center>" CRLF
+"</body>" CRLF
+"</html>" CRLF
+;
+
+
static u_char ngx_http_error_tail[] =
"<hr><center>nginx</center>" CRLF
"</body>" CRLF
@@ -628,10 +635,14 @@ ngx_http_send_special_response(ngx_http_request_t *r,
ngx_uint_t msie_padding;
ngx_chain_t out[3];
- if (clcf->server_tokens) {
+ if (clcf->server_tokens == NGX_HTTP_SERVER_TOKENS_ON) {
len = sizeof(ngx_http_error_full_tail) - 1;
tail = ngx_http_error_full_tail;
+ } else if (clcf->server_tokens == NGX_HTTP_SERVER_TOKENS_BUILD) {
+ len = sizeof(ngx_http_error_build_tail) - 1;
+ tail = ngx_http_error_build_tail;
+
} else {
len = sizeof(ngx_http_error_tail) - 1;
tail = ngx_http_error_tail;