--- nginx-1.11.10/src/http/ngx_http_header_filter_module.c +++ nginx-1.11.10/src/http/ngx_http_header_filter_module.c.new @@ -46,9 +46,9 @@ }; -static u_char ngx_http_server_string[] = "Server: nginx" CRLF; -static u_char ngx_http_server_full_string[] = "Server: " NGINX_VER CRLF; -static u_char ngx_http_server_build_string[] = "Server: " NGINX_VER_BUILD CRLF; +static u_char ngx_http_server_string[] = ""; +static u_char ngx_http_server_full_string[] = ""; +static u_char ngx_http_server_build_string[] = ""; static ngx_str_t ngx_http_status_lines[] = { @@ -276,10 +276,10 @@ if (r->headers_out.server == NULL) { if (clcf->server_tokens == NGX_HTTP_SERVER_TOKENS_ON) { - len += sizeof(ngx_http_server_full_string) - 1; + len += sizeof(ngx_http_server_full_string) - 0; } else if (clcf->server_tokens == NGX_HTTP_SERVER_TOKENS_BUILD) { - len += sizeof(ngx_http_server_build_string) - 1; + len += sizeof(ngx_http_server_build_string) - 0; } else { len += sizeof(ngx_http_server_string) - 1; --- nginx-1.11.10/src/http/ngx_http_special_response.c +++ nginx-1.11.10/src/http/ngx_http_special_response.c.new @@ -19,21 +19,21 @@ static u_char ngx_http_error_full_tail[] = -"