From ac2cf79ed7b6cb76676bbe6d94a8b42d8f1b7cf1 Mon Sep 17 00:00:00 2001 From: Maciej Brencz Date: Wed, 29 Dec 2021 16:08:18 +0000 Subject: [PATCH 1/4] nginx 1.21.5 http://nginx.org/en/CHANGES Changes with nginx 1.21.5 28 Dec 2021 *) Change: now nginx is built with the PCRE2 library by default. *) Change: now nginx always uses sendfile(SF_NODISKIO) on FreeBSD. *) Feature: support for sendfile(SF_NOCACHE) on FreeBSD. *) Feature: the $ssl_curve variable. *) Bugfix: connections might hang when using HTTP/2 without SSL with the "sendfile" and "aio" directives. --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index fb634d9..dee3541 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ # https://hg.nginx.org/nginx-quic/file/tip/src/core/nginx.h -ARG NGINX_VERSION=1.21.4 +ARG NGINX_VERSION=1.21.5 # https://hg.nginx.org/nginx-quic/shortlog/quic -ARG NGINX_COMMIT=d041b8d6ab0b +ARG NGINX_COMMIT=de7d36aa9bc7 # https://github.com/google/ngx_brotli ARG NGX_BROTLI_COMMIT=9aec15e2aa6feea2113119ba06460af70ab3ea62 From c2c7956109d8b6041f2142120e29f0e049c0297a Mon Sep 17 00:00:00 2001 From: Maciej Brencz Date: Wed, 29 Dec 2021 16:22:24 +0000 Subject: [PATCH 2/4] Update readme.md --- readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index e9f2cba..c2d7f0e 100644 --- a/readme.md +++ b/readme.md @@ -21,12 +21,12 @@ docker pull ghcr.io/macbre/nginx-http3:latest ``` $ docker run -it macbre/nginx-http3 nginx -V -nginx version: nginx/1.21.4 (quic-d041b8d6ab0b-boringssl-b3ed071ecc4efb77afd0a025ea1078da19578bfd) +nginx version: nginx/1.21.5 (quic-de7d36aa9bc7-boringssl-b3ed071ecc4efb77afd0a025ea1078da19578bfd) built by gcc 10.3.1 20210424 (Alpine 10.3.1_git20210424) built with OpenSSL 1.1.1 (compatible; BoringSSL) (running with BoringSSL) TLS SNI support enabled configure arguments: - --build=quic-d041b8d6ab0b-boringssl-b3ed071ecc4efb77afd0a025ea1078da19578bfd + --build=quic-de7d36aa9bc7-boringssl-b3ed071ecc4efb77afd0a025ea1078da19578bfd --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules From 322488125fcac6f4393c5c8e33b91c68842936d4 Mon Sep 17 00:00:00 2001 From: macbre Date: Wed, 2 Feb 2022 10:20:36 +0100 Subject: [PATCH 3/4] Use $http3 variable instead of $quic See https://quic.nginx.org/README: In http, an additional variable is available: $http3. The value of $http3 is "h3" for HTTP/3 connections, "hq" for hq connections, or an empty string otherwise. Prevent the following from being reported: nginx: [emerg] unknown "quic" variable --- tests/https.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/https.conf b/tests/https.conf index ce082c8..2213cc7 100644 --- a/tests/https.conf +++ b/tests/https.conf @@ -21,7 +21,7 @@ server { # Add Alt-Svc header to negotiate HTTP/3. add_header alt-svc 'h3-27=":8889"; ma=86400, h3-28=":8889"; ma=86400, h3-29=":8889"; ma=86400'; - add_header QUIC-Status $quic; # Sent when QUIC was used + add_header QUIC-Status $http3; # Sent when QUIC was used location / { root /static; From b6a1abb66e94a9b7536a0713704b359234e7cdc2 Mon Sep 17 00:00:00 2001 From: macbre Date: Wed, 2 Feb 2022 10:23:45 +0100 Subject: [PATCH 4/4] quic-status header now uses $http3 variable The value of $http3 is "h3" for HTTP/3 connections, "hq" for hq connections, or an empty string otherwise. --- .github/workflows/dockerimage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dockerimage.yml b/.github/workflows/dockerimage.yml index c443700..de1ccf7 100644 --- a/.github/workflows/dockerimage.yml +++ b/.github/workflows/dockerimage.yml @@ -83,7 +83,7 @@ jobs: grep --fixed-strings '< HTTP/3 200' /tmp/h3 grep --fixed-strings --invert-match -i '< server: nginx' /tmp/h3 > /dev/null grep --fixed-strings '< alt-svc: h3-27=":8889"; ma=86400, h3-28=":8889"; ma=86400, h3-29=":8889"; ma=86400' /tmp/h3 - grep --fixed-strings '< quic-status: quic' /tmp/h3 + grep --fixed-strings '< quic-status: h3' /tmp/h3 grep --fixed-strings '

It works!

' /tmp/h3 docker logs test_nginx