From 672b9659cf711c753073105c41fd2770b07edb16 Mon Sep 17 00:00:00 2001 From: "W.C.A. Wijngaards" Date: Tue, 30 Jun 2026 12:14:00 +0200 Subject: [PATCH 1/2] =?UTF-8?q?-=20Fix=20#1469:=20dohclient:=20DoH=20POST?= =?UTF-8?q?=20missing=20content-length=20=E2=86=92=20:status=20=20=20400?= =?UTF-8?q?=20from=20strict=20resolvers=20(Cloudflare,=20Mullvad).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/Changelog | 4 ++++ testcode/dohclient.c | 15 ++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/doc/Changelog b/doc/Changelog index 6a68008cb..9626562e5 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,7 @@ +30 June 2026: Wouter + - Fix #1469: dohclient: DoH POST missing content-length → :status + 400 from strict resolvers (Cloudflare, Mullvad). + 26 June 2026: Wouter - Merge #1467: daemon: fix DEREF_AFTER_NULL.EX.COND on worker_init. This fixes error handling if the worker diff --git a/testcode/dohclient.c b/testcode/dohclient.c index 8d8adaf5d..08250ef3a 100644 --- a/testcode/dohclient.c +++ b/testcode/dohclient.c @@ -146,7 +146,9 @@ submit_query(struct http2_session* h2_session, struct sldns_buffer* buf) { int32_t stream_id; struct http2_stream* h2_stream; - nghttp2_nv headers[5]; + nghttp2_nv headers[6]; + size_t num_headers = 5; + char clen[16]; char* qb64; size_t qb64_size; size_t qb64_expected_size; @@ -194,9 +196,16 @@ submit_query(struct http2_session* h2_session, struct sldns_buffer* buf) headers[3].value = (uint8_t*)h2_session->authority; headers[4].name = (uint8_t*)"content-type"; headers[4].value = (uint8_t*)h2_session->content_type; + if(h2_session->post) { + snprintf(clen, sizeof(clen), "%u", + (unsigned)sldns_buffer_remaining(buf)); + headers[5].name = (uint8_t*)"content-length"; + headers[5].value = (uint8_t*)clen; + num_headers = 6; + } printf("Request headers\n"); - for(i=0; isession, NULL, headers, - sizeof(headers)/sizeof(headers[0]), + num_headers, (h2_session->post) ? &data_prd : NULL, h2_stream); if(stream_id < 0) { printf("Failed to submit nghttp2 request"); From f35561287acdc143a018020219b49606438979c8 Mon Sep 17 00:00:00 2001 From: "W.C.A. Wijngaards" Date: Tue, 30 Jun 2026 12:38:33 +0200 Subject: [PATCH 2/2] - iana portlist updated. --- doc/Changelog | 1 + util/iana_ports.inc | 1 + 2 files changed, 2 insertions(+) diff --git a/doc/Changelog b/doc/Changelog index 9626562e5..2dc431ef0 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,6 +1,7 @@ 30 June 2026: Wouter - Fix #1469: dohclient: DoH POST missing content-length → :status 400 from strict resolvers (Cloudflare, Mullvad). + - iana portlist updated. 26 June 2026: Wouter - Merge #1467: daemon: fix DEREF_AFTER_NULL.EX.COND on diff --git a/util/iana_ports.inc b/util/iana_ports.inc index 21dec9912..9bb2fefbe 100644 --- a/util/iana_ports.inc +++ b/util/iana_ports.inc @@ -4507,6 +4507,7 @@ 6581, 6582, 6583, +6610, 6619, 6620, 6621,