Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 May 2026 15:33:42 +0000
From:      Ryan Steinmetz <zi@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: a11e56e77d1a - main - www/varnish7: Backport HTTP2 fix, bump PORTREVISION
Message-ID:  <6a0b3156.42b16.b05cda3@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by zi:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a11e56e77d1a47d7ac1a961b6388cd94bdea48ca

commit a11e56e77d1a47d7ac1a961b6388cd94bdea48ca
Author:     Ryan Steinmetz <zi@FreeBSD.org>
AuthorDate: 2026-05-18 15:32:13 +0000
Commit:     Ryan Steinmetz <zi@FreeBSD.org>
CommitDate: 2026-05-18 15:32:13 +0000

    www/varnish7: Backport HTTP2 fix, bump PORTREVISION
    
    Approved by:    dbaio@
    Obtained from:  upstream
    Security:       0f4bb64-52c6-11f1-a1c0-0050569f0b83
---
 www/varnish7/Makefile                              |  1 +
 .../patch-bin_varnishd_http2_cache__http2__hpack.c | 45 ++++++++++++++++++++++
 www/varnish7/files/patch-include_vdef.h            | 23 +++++++++++
 3 files changed, 69 insertions(+)

diff --git a/www/varnish7/Makefile b/www/varnish7/Makefile
index 8b934d86784e..97999e2ba500 100644
--- a/www/varnish7/Makefile
+++ b/www/varnish7/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	varnish
 DISTVERSION=	7.7.3
+PORTREVISION=	1
 CATEGORIES=	www
 MASTER_SITES=	https://varnish-cache.org/downloads/
 PKGNAMESUFFIX=	7
diff --git a/www/varnish7/files/patch-bin_varnishd_http2_cache__http2__hpack.c b/www/varnish7/files/patch-bin_varnishd_http2_cache__http2__hpack.c
new file mode 100644
index 000000000000..cad7a205eb8e
--- /dev/null
+++ b/www/varnish7/files/patch-bin_varnishd_http2_cache__http2__hpack.c
@@ -0,0 +1,45 @@
+--- bin/varnishd/http2/cache_http2_hpack.c.orig	2025-08-20 12:50:25 UTC
++++ bin/varnishd/http2/cache_http2_hpack.c
+@@ -171,7 +171,7 @@ h2h_addhdr(struct http *hp, struct h2h_decode *d)
+ 
+ 	/* Match H/2 pseudo headers */
+ 	/* XXX: Should probably have some include tbl for pseudo-headers */
+-	if (!Tstrcmp(nm, ":method")) {
++	if (Tstreq(nm, ":method")) {
+ 		hdr.b = val.b;
+ 		n = HTTP_HDR_METHOD;
+ 		disallow_empty = 1;
+@@ -181,13 +181,13 @@ h2h_addhdr(struct http *hp, struct h2h_decode *d)
+ 			if (!vct_istchar(*p))
+ 				return (H2SE_PROTOCOL_ERROR);
+ 		}
+-	} else if (!Tstrcmp(nm, ":path")) {
++	} else if (Tstreq(nm, ":path")) {
+ 		hdr.b = val.b;
+ 		n = HTTP_HDR_URL;
+ 		disallow_empty = 1;
+ 
+ 		// rfc9113,l,2693,2705
+-		if (Tlen(val) > 0 && val.b[0] != '/' && Tstrcmp(val, "*")) {
++		if (Tlen(val) > 0 && val.b[0] != '/' && !Tstreq(val, "*")) {
+ 			VSLb(hp->vsl, SLT_BogoHeader,
+ 			    "Illegal :path pseudo-header %.*s",
+ 			    (int)Tlen(val), val.b);
+@@ -199,7 +199,7 @@ h2h_addhdr(struct http *hp, struct h2h_decode *d)
+ 			if (vct_islws(*p) || vct_isctl(*p))
+ 				return (H2SE_PROTOCOL_ERROR);
+ 		}
+-	} else if (!Tstrcmp(nm, ":scheme")) {
++	} else if (Tstreq(nm, ":scheme")) {
+ 		/* XXX: What to do about this one? (typically
+ 		   "http" or "https"). For now set it as a normal
+ 		   header, stripping the first ':'. */
+@@ -213,7 +213,7 @@ h2h_addhdr(struct http *hp, struct h2h_decode *d)
+ 			if (!vct_istchar(*p))
+ 				return (H2SE_PROTOCOL_ERROR);
+ 		}
+-	} else if (!Tstrcmp(nm, ":authority")) {
++	} else if (Tstreq(nm, ":authority")) {
+ 		/* NB: we inject "host" in place of "rity" for
+ 		 * the ":authority" pseudo-header.
+ 		 */
diff --git a/www/varnish7/files/patch-include_vdef.h b/www/varnish7/files/patch-include_vdef.h
new file mode 100644
index 000000000000..13528fa2d8bb
--- /dev/null
+++ b/www/varnish7/files/patch-include_vdef.h
@@ -0,0 +1,23 @@
+--- include/vdef.h.orig	2025-08-20 12:50:25 UTC
++++ include/vdef.h
+@@ -255,6 +255,12 @@ int __llvm_gcov_flush(void);
+ #  endif
+ #endif
+ 
++#if __has_builtin(__builtin_memcmp)
++#  define vmemcmp(s1, s2, n) __builtin_memcmp(s1, s2, n)
++#else
++#  define vmemcmp(s1, s2, n) memcmp(s1, s2, n)
++#endif
++
+ #ifndef v_counted_by_
+ #  define v_counted_by_(field)
+ #endif
+@@ -277,6 +283,7 @@ typedef struct {
+ #define Tlen(t)		(pdiff((t).b, (t).e))
+ #define Tstr(s)		(/*lint -e(446)*/ (txt){(s), (s) + strlen(s)})
+ #define Tstrcmp(t, s)	(strncmp((t).b, (s), Tlen(t)))
++#define Tstreq(t, s)	(Tlen(t) == strlen(s) && !vmemcmp((t).b, (s), Tlen(t)))
+ #define Tforeach(c, t)	for ((c) = (t).b; (c) < (t).e; (c)++)
+ 
+ /* #3020 dummy definitions until PR is merged*/


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a0b3156.42b16.b05cda3>