<div dir="auto"><div dir="auto">Thank you. LGTM.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">2024年2月25日(日) 0:04 Maxim Dounin <<a href="mailto:mdounin@mdounin.ru" target="_blank" rel="noreferrer">mdounin@mdounin.ru</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello!<br>
<br>
On Sat, Feb 24, 2024 at 08:50:26PM +0900, Tatsuya Kaneko wrote:<br>
<br>
> Hello.<br>
> <br>
> I hope you're doing well. I made a patch for nginx that I want to<br>
> share with you. This patch changes the Server header from "nginx" to<br>
> "freenginx" for HTTP/1.1. You already did this for HTTP/2 and HTTP/3,<br>
> but forgot HTTP/1.1.<br>
> <br>
> What I changed:<br>
> <br>
> File: src/http/ngx_http_header_filter_module.c<br>
> Change: Server header to "freenginx"<br>
> <br>
> Why: To make HTTP/1.1 and HTTP/2 the same for our server signature.<br>
> <br>
> Please see the attached patch file. I look forward to your feedback.<br>
> Let me know if I need to fix anything.<br>
<br>
Thanks for catching this. Indeed, missed in 9213:23f109f0facc the <br>
HTTP/1.x case with "server_tokens off;".<br>
<br>
> # HG changeset patch<br>
> # User catatsuy <<a href="mailto:catatsuy@catatsuy.org" rel="noreferrer noreferrer" target="_blank">catatsuy@catatsuy.org</a>><br>
<br>
Shouldn't it be "Tatsuya Kaneko <<a href="mailto:catatsuy@catatsuy.org" rel="noreferrer noreferrer" target="_blank">catatsuy@catatsuy.org</a>>"?<br>
<br>
> # Date 1708774686 -32400<br>
> # Sat Feb 24 20:38:06 2024 +0900<br>
> # Node ID ce4bdb0116560cf735110ace589764f15ca321d8<br>
> # Parent 8b8b2e1aa77a3539772815bd0d57450bae674e5c<br>
> Update HTTP/1.1 Server header to "freenginx"<br>
<br>
Something like this should be more in line with existing style:<br>
<br>
: Fixed server name in HTTP/1.x with "server_tokens off;".<br>
: <br>
: Missed in 9213:23f109f0facc.<br>
<br>
> <br>
> diff -r 8b8b2e1aa77a -r ce4bdb011656 src/http/ngx_http_header_filter_module.c<br>
> --- a/src/http/ngx_http_header_filter_module.c Tue Feb 20 20:15:32 2024 +0300<br>
> +++ b/src/http/ngx_http_header_filter_module.c Sat Feb 24 20:38:06 2024 +0900<br>
> @@ -46,7 +46,7 @@<br>
> };<br>
> <br>
> <br>
> -static u_char ngx_http_server_string[] = "Server: nginx" CRLF;<br>
> +static u_char ngx_http_server_string[] = "Server: freenginx" CRLF;<br>
> static u_char ngx_http_server_full_string[] = "Server: " NGINX_VER CRLF;<br>
> static u_char ngx_http_server_build_string[] = "Server: " NGINX_VER_BUILD CRLF;<br>
> <br>
<br>
Following 9213:23f109f0facc changes, it should be NGINX_NAME <br>
instead:<br>
<br>
-static u_char ngx_http_server_string[] = "Server: nginx" CRLF;<br>
+static u_char ngx_http_server_string[] = "Server: " NGINX_NAME CRLF;<br>
<br>
Full updated patch below, please let me know it if looks good for <br>
you:<br>
<br>
# HG changeset patch<br>
# User Tatsuya Kaneko <<a href="mailto:catatsuy@catatsuy.org" rel="noreferrer noreferrer" target="_blank">catatsuy@catatsuy.org</a>><br>
# Date 1708786720 -10800<br>
# Sat Feb 24 17:58:40 2024 +0300<br>
# Node ID 59005d22b945f163f825cd201af991eb0e266206<br>
# Parent 8b8b2e1aa77a3539772815bd0d57450bae674e5c<br>
Fixed server name in HTTP/1.x with "server_tokens off;".<br>
<br>
Missed in 9213:23f109f0facc.<br>
<br>
diff --git a/src/http/ngx_http_header_filter_module.c b/src/http/ngx_http_header_filter_module.c<br>
--- a/src/http/ngx_http_header_filter_module.c<br>
+++ b/src/http/ngx_http_header_filter_module.c<br>
@@ -46,7 +46,7 @@ ngx_module_t ngx_http_header_filter_mod<br>
};<br>
<br>
<br>
-static u_char ngx_http_server_string[] = "Server: nginx" CRLF;<br>
+static u_char ngx_http_server_string[] = "Server: " NGINX_NAME CRLF;<br>
static u_char ngx_http_server_full_string[] = "Server: " NGINX_VER CRLF;<br>
static u_char ngx_http_server_build_string[] = "Server: " NGINX_VER_BUILD CRLF;<br>
<br>
<br>
<br>
-- <br>
Maxim Dounin<br>
<a href="http://mdounin.ru/" rel="noreferrer noreferrer noreferrer" target="_blank">http://mdounin.ru/</a><br>
-- <br>
nginx-devel mailing list<br>
<a href="mailto:nginx-devel@freenginx.org" rel="noreferrer noreferrer" target="_blank">nginx-devel@freenginx.org</a><br>
<a href="https://freenginx.org/mailman/listinfo/nginx-devel" rel="noreferrer noreferrer noreferrer" target="_blank">https://freenginx.org/mailman/listinfo/nginx-devel</a><br>
</blockquote></div></div>