diff --git a/doc/Changelog b/doc/Changelog index 6a68008cb..2dc431ef0 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,8 @@ +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 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"); 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,