test1658: add unit test for the HTTPS RR decoder

Made the HTTPS-RR parser a little stricter while at it.

Drop the ALPN escape handling, that was not needed.

Make the hode handle (and ignore) duplicate ALPN entries.

Closes #16972
This commit is contained in:
Daniel Stenberg 2025-04-04 23:21:41 +02:00
parent 023cc8d595
commit badfb951ec
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
9 changed files with 645 additions and 77 deletions

View file

@ -220,6 +220,7 @@ test1620 test1621 \
test1630 test1631 test1632 test1633 test1634 test1635 \
\
test1650 test1651 test1652 test1653 test1654 test1655 test1656 test1657 \
test1658 \
test1660 test1661 test1662 test1663 test1664 \
\
test1670 test1671 \

30
tests/data/test1658 Normal file
View file

@ -0,0 +1,30 @@
<testcase>
<info>
<keywords>
unittest
doh
httpsrr
</keywords>
</info>
#
# Client-side
<client>
<server>
none
</server>
<features>
unittest
DoH
</features>
<name>
unit test for doh_resp_decode_httpsrr
</name>
</client>
<verify>
<stderr mode="text">
URL: -
Test ended with result 0
</stderr>
</verify>
</testcase>