113498266Sopenharmony_ci<testcase>
213498266Sopenharmony_ci<info>
313498266Sopenharmony_ci<keywords>
413498266Sopenharmony_ciHTTP
513498266Sopenharmony_ciHTTP GET
613498266Sopenharmony_ciDOH
713498266Sopenharmony_ci</keywords>
813498266Sopenharmony_ci</info>
913498266Sopenharmony_ci
1013498266Sopenharmony_ci#
1113498266Sopenharmony_ci# Server-side
1213498266Sopenharmony_ci<reply>
1313498266Sopenharmony_ci
1413498266Sopenharmony_ci# This is the DoH response for foo.example.com A 127.0.0.1. This requires that
1513498266Sopenharmony_ci# the test server is accessible at that address!
1613498266Sopenharmony_ci
1713498266Sopenharmony_ci<data1 base64="yes">
1813498266Sopenharmony_ciSFRUUC8xLjEgMjAwIE9LCkRhdGU6IFRodSwgMDkgTm92IDIwMTAgMTQ6NDk6MDAgR01UClNlcnZl
1913498266Sopenharmony_cicjogdGVzdC1zZXJ2ZXIvZmFrZQpDb25uZWN0aW9uOiBjbG9zZQpDb250ZW50LVR5cGU6IGFwcGxp
2013498266Sopenharmony_ciY2F0aW9uL2Rucy1tZXNzYWdlCkNvbnRlbnQtTGVuZ3RoOiA0OQoKAAABAAABAAEAAAAAA2Zvbwdl
2113498266Sopenharmony_cieGFtcGxlA2NvbQAAAQABwAwAAQABAAAANwAEfwAAAQ==
2213498266Sopenharmony_ci</data1>
2313498266Sopenharmony_ci<data>
2413498266Sopenharmony_ciHTTP/1.1 200 OK
2513498266Sopenharmony_ciDate: Tue, 09 Nov 2010 14:49:00 GMT
2613498266Sopenharmony_ciServer: test-server/fake
2713498266Sopenharmony_ciLast-Modified: Tue, 13 Jun 2000 12:10:00 GMT
2813498266Sopenharmony_ciETag: "21025-dc7-39462498"
2913498266Sopenharmony_ciAccept-Ranges: bytes
3013498266Sopenharmony_ciContent-Length: 6
3113498266Sopenharmony_ciConnection: close
3213498266Sopenharmony_ciContent-Type: text/html
3313498266Sopenharmony_ciFunny-head: yesyes
3413498266Sopenharmony_ci
3513498266Sopenharmony_ci-foo-
3613498266Sopenharmony_ci</data>
3713498266Sopenharmony_ci</reply>
3813498266Sopenharmony_ci
3913498266Sopenharmony_ci#
4013498266Sopenharmony_ci# Client-side
4113498266Sopenharmony_ci<client>
4213498266Sopenharmony_ci<server>
4313498266Sopenharmony_cihttp
4413498266Sopenharmony_ci</server>
4513498266Sopenharmony_ci
4613498266Sopenharmony_ci# requires debug so that it can use the DoH server without https
4713498266Sopenharmony_ci# requires IPv6 so that we can assume and compare both DoH requests
4813498266Sopenharmony_ci
4913498266Sopenharmony_ci<features>
5013498266Sopenharmony_cidebug
5113498266Sopenharmony_ciDoH
5213498266Sopenharmony_ciipv6
5313498266Sopenharmony_ci</features>
5413498266Sopenharmony_ci<name>
5513498266Sopenharmony_ciHTTP GET using DoH
5613498266Sopenharmony_ci</name>
5713498266Sopenharmony_ci<command>
5813498266Sopenharmony_cihttp://foo.example.com:%HTTPPORT/%TESTNUMBER --doh-url http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001
5913498266Sopenharmony_ci</command>
6013498266Sopenharmony_ci</client>
6113498266Sopenharmony_ci
6213498266Sopenharmony_ci#
6313498266Sopenharmony_ci# Verify data after the test has been "shot"
6413498266Sopenharmony_ci<verify>
6513498266Sopenharmony_ci
6613498266Sopenharmony_ci# To make the test ignore the order of the two outgoing DoH requests, strip
6713498266Sopenharmony_ci# the family byte
6813498266Sopenharmony_ci
6913498266Sopenharmony_ci<strippart>
7013498266Sopenharmony_cis/com\x00\x00(\x1c|\x01)/com-00-00!/g;
7113498266Sopenharmony_ci</strippart>
7213498266Sopenharmony_ci<protocol>
7313498266Sopenharmony_ciPOST /%TESTNUMBER0001 HTTP/1.1
7413498266Sopenharmony_ciHost: %HOSTIP:%HTTPPORT
7513498266Sopenharmony_ciAccept: */*
7613498266Sopenharmony_ciContent-Type: application/dns-message
7713498266Sopenharmony_ciContent-Length: 33
7813498266Sopenharmony_ci
7913498266Sopenharmony_ci%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
8013498266Sopenharmony_ciHost: %HOSTIP:%HTTPPORT
8113498266Sopenharmony_ciAccept: */*
8213498266Sopenharmony_ciContent-Type: application/dns-message
8313498266Sopenharmony_ciContent-Length: 33
8413498266Sopenharmony_ci
8513498266Sopenharmony_ci%hex[%00%00%01%00%00%01%00%00%00%00%00%00%03foo%07example%03com-00-00!%00%01]hex%GET /%TESTNUMBER HTTP/1.1
8613498266Sopenharmony_ciHost: foo.example.com:%HTTPPORT
8713498266Sopenharmony_ciUser-Agent: curl/%VERSION
8813498266Sopenharmony_ciAccept: */*
8913498266Sopenharmony_ci
9013498266Sopenharmony_ci</protocol>
9113498266Sopenharmony_ci</verify>
9213498266Sopenharmony_ci</testcase>
93