doh: send HTTPS RR requests for all HTTP(S) transfers

When enabled in the build.

Update test2100: verify with HTTPS RR included

Adjust runtests and server/disabled.c to include "HTTPSRR" as a feature
in the test suite.

Also, decode the ALPN list in HTTPS records straight into IDs. There's
no point in storing everything in string format. Skip ALPNs we do not
support.

Closes #16007
This commit is contained in:
Daniel Stenberg 2025-01-15 11:04:46 +01:00
parent 5d70a5c5a4
commit bb93536270
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
11 changed files with 94 additions and 65 deletions

View file

@ -52,7 +52,7 @@ DoH
IPv6
</features>
<name>
HTTP GET using DoH
HTTP GET using DoH (with HTTPS RR)
</name>
<command>
http://foo.example.com:%HTTPPORT/%TESTNUMBER --doh-url http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001
@ -70,6 +70,31 @@ http://foo.example.com:%HTTPPORT/%TESTNUMBER --doh-url http://%HOSTIP:%HTTPPORT/
s/com\x00\x00(\x1c|\x01)/com-00-00!/g;
</strippart>
<protocol>
%if HTTPSRR
POST /%TESTNUMBER0001 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
Content-Type: application/dns-message
Content-Length: 33
%hex[%00%00%01%00%00%01%00%00%00%00%00%00%03foo%07example%03com-00-00!%00%01]hex%POST /%TESTNUMBER0001 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
Content-Type: application/dns-message
Content-Length: 33
%hex[%00%00%01%00%00%01%00%00%00%00%00%00%03foo%07example%03com-00-00!%00%01]hex%POST /%TESTNUMBER0001 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
Content-Type: application/dns-message
Content-Length: 47
%hex[%00%00%01%00%00%01%00%00%00%00%00%00%06_%HTTPPORT%06_https%03foo%07example%03com%00%00A%00%01]hex%GET /%TESTNUMBER HTTP/1.1
Host: foo.example.com:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*
%else
POST /%TESTNUMBER0001 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
@ -87,6 +112,7 @@ Host: foo.example.com:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*
%endif
</protocol>
</verify>
</testcase>