blob: 35ec592d71483e708865b5c6c6c0657f4aad1ccf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# diff -Nau nginx-1.30.0/src/http/ngx_http_special_response.c nginx-1.30.0_patched/src/http/ngx_http_special_response.c > nginx-without-server-header/ngx_http_special_response.c.patch
--- nginx-1.30.0/src/http/ngx_http_special_response.c 2026-04-14 10:10:11.000000000 -0300
+++ nginx-1.30.0_patched/src/http/ngx_http_special_response.c 2026-04-16 20:20:38.342377986 -0300
@@ -18,22 +18,8 @@
static ngx_int_t ngx_http_send_refresh(ngx_http_request_t *r);
-static u_char ngx_http_error_full_tail[] =
-"<hr><center>" NGINX_VER "</center>" CRLF
-"</body>" CRLF
-"</html>" CRLF
-;
-
-
-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
+"<hr>" CRLF
"</body>" CRLF
"</html>" CRLF
;
@@ -688,18 +674,8 @@
ngx_uint_t msie_padding;
ngx_chain_t out[3];
- 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;
- }
+ len = sizeof(ngx_http_error_tail) - 1;
+ tail = ngx_http_error_tail;
msie_padding = 0;
|