git: c1d6483e001c - main - www/libmicrohttpd: Update to 1.0.4

From: Daniel Engberg <diizzy_at_FreeBSD.org>
Date: Thu, 16 Apr 2026 20:09:58 UTC
The branch main has been updated by diizzy:

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

commit c1d6483e001c8ee3c7575ccf901557669f944496
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2026-04-16 19:33:19 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2026-04-16 20:09:08 +0000

    www/libmicrohttpd: Update to 1.0.4
    
    Backport upstream commits 4f049186bfe22ba12c07279f2eef99293798a710 and
    a083613d8405fa3ad7f6bc5bbbb635d0f50799e0
    
    References:
    https://git.gnunet.org/gnunet/libmicrohttpd/commit/4f049186bfe22ba12c07279f2eef99293798a710.html
    https://git.gnunet.org/gnunet/libmicrohttpd/commit/a083613d8405fa3ad7f6bc5bbbb635d0f50799e0.html
    
    Changelog: https://github.com/Karlson2k/libmicrohttpd/blob/d30316fda936111ad5d4f8b1fde7747c289468b6/ChangeLog
    
    PR:             294534
    Reviewed by:    Hung-Yi Chen <gaod@hychen.org> (maintainer)
---
 www/libmicrohttpd/Makefile                               |  5 +++--
 www/libmicrohttpd/distinfo                               |  6 +++---
 www/libmicrohttpd/files/patch-src_include_microhttpd.h   | 11 +++++++++++
 .../files/patch-src_microhttpd_connection.c              | 16 ++++++++++++++++
 www/libmicrohttpd/pkg-plist                              |  3 +--
 5 files changed, 34 insertions(+), 7 deletions(-)

diff --git a/www/libmicrohttpd/Makefile b/www/libmicrohttpd/Makefile
index 0243177181c9..f11793c91c1c 100644
--- a/www/libmicrohttpd/Makefile
+++ b/www/libmicrohttpd/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	libmicrohttpd
-DISTVERSION=	1.0.2
+DISTVERSION=	1.0.4
 CATEGORIES=	www
 MASTER_SITES=	GNU
 
@@ -20,7 +20,8 @@ INFO=		libmicrohttpd libmicrohttpd-tutorial
 INSTALL_TARGET=	install-strip
 TEST_TARGET=	check
 
-CONFIGURE_ARGS=	--disable-examples
+CONFIGURE_ARGS=	--disable-examples \
+		--disable-static
 
 OPTIONS_DEFINE=		GNUTLS TESTCURL
 OPTIONS_DEFAULT=	GNUTLS
diff --git a/www/libmicrohttpd/distinfo b/www/libmicrohttpd/distinfo
index 6ea4cf168e66..352e06f8c61c 100644
--- a/www/libmicrohttpd/distinfo
+++ b/www/libmicrohttpd/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1753030337
-SHA256 (libmicrohttpd-1.0.2.tar.gz) = df324fcd0834175dab07483133902d9774a605bfa298025f69883288fd20a8c7
-SIZE (libmicrohttpd-1.0.2.tar.gz) = 2198804
+TIMESTAMP = 1776227503
+SHA256 (libmicrohttpd-1.0.4.tar.gz) = d72e5cfccd62bf2f79252edbc3828eeedc088ce71fc47b7c9e3bd7246b3d54de
+SIZE (libmicrohttpd-1.0.4.tar.gz) = 2102676
diff --git a/www/libmicrohttpd/files/patch-src_include_microhttpd.h b/www/libmicrohttpd/files/patch-src_include_microhttpd.h
new file mode 100644
index 000000000000..bc383c4eb3ca
--- /dev/null
+++ b/www/libmicrohttpd/files/patch-src_include_microhttpd.h
@@ -0,0 +1,11 @@
+--- src/include/microhttpd.h.orig	2026-04-01 22:24:48 UTC
++++ src/include/microhttpd.h
+@@ -101,7 +101,7 @@ MHD_C_DECLRATIONS_START_HERE_
+  * they are parsed as decimal numbers.
+  * Example: 0x01093001 = 1.9.30-1.
+  */
+-#define MHD_VERSION 0x01000300
++#define MHD_VERSION 0x01000400
+ 
+ /* If generic headers don't work on your platform, include headers
+    which define 'va_list', 'size_t', 'ssize_t', 'intptr_t', 'off_t',
diff --git a/www/libmicrohttpd/files/patch-src_microhttpd_connection.c b/www/libmicrohttpd/files/patch-src_microhttpd_connection.c
new file mode 100644
index 000000000000..184db5724dfd
--- /dev/null
+++ b/www/libmicrohttpd/files/patch-src_microhttpd_connection.c
@@ -0,0 +1,16 @@
+--- src/microhttpd/connection.c.orig	2026-04-13 09:38:40 UTC
++++ src/microhttpd/connection.c
+@@ -4902,10 +4902,9 @@ parse_connection_headers (struct MHD_Connection *conne
+ 
+     for (pos = connection->rq.headers_received; NULL != pos; pos = pos->next)
+       if ( (0 != (pos->kind & MHD_HEADER_KIND)) &&
+-           (MHD_str_equal_caseless_bin_n_ (MHD_HTTP_HEADER_CONTENT_LENGTH,
+-                                           pos->header,
+-                                           MHD_STATICSTR_LEN_ (
+-                                             MHD_HTTP_HEADER_CONTENT_LENGTH))) )
++           (MHD_str_equal_caseless_s_bin_n_ (MHD_HTTP_HEADER_CONTENT_LENGTH,
++                                             pos->header,
++                                             pos->header_size)) )
+       {
+         const char *clen;
+         size_t val_len;
diff --git a/www/libmicrohttpd/pkg-plist b/www/libmicrohttpd/pkg-plist
index 7af0aa493409..8047ff964473 100644
--- a/www/libmicrohttpd/pkg-plist
+++ b/www/libmicrohttpd/pkg-plist
@@ -1,8 +1,7 @@
 include/microhttpd.h
-lib/libmicrohttpd.a
 lib/libmicrohttpd.so
 lib/libmicrohttpd.so.12
-lib/libmicrohttpd.so.12.62.2
+lib/libmicrohttpd.so.12.62.3
 libdata/pkgconfig/libmicrohttpd.pc
 share/man/man3/libmicrohttpd.3.gz
 share/info/libmicrohttpd_performance_data.png