1<testcase> 2<info> 3<keywords> 4HTTP 5HTTP GET 6DOH 7</keywords> 8</info> 9 10# 11# Server-side 12<reply> 13 14# This is the DoH response for foo.example.com A 127.0.0.1. This requires that 15# the test server is accessible at that address! 16 17<data1 base64="yes"> 18SFRUUC8xLjEgMjAwIE9LCkRhdGU6IFRodSwgMDkgTm92IDIwMTAgMTQ6NDk6MDAgR01UClNlcnZl 19cjogdGVzdC1zZXJ2ZXIvZmFrZQpDb25uZWN0aW9uOiBjbG9zZQpDb250ZW50LVR5cGU6IGFwcGxp 20Y2F0aW9uL2Rucy1tZXNzYWdlCkNvbnRlbnQtTGVuZ3RoOiA0OQoKAAABAAABAAEAAAAAA2Zvbwdl 21eGFtcGxlA2NvbQAAAQABwAwAAQABAAAANwAEfwAAAQ== 22</data1> 23<data> 24HTTP/1.1 200 OK 25Date: Tue, 09 Nov 2010 14:49:00 GMT 26Server: test-server/fake 27Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT 28ETag: "21025-dc7-39462498" 29Accept-Ranges: bytes 30Content-Length: 6 31Connection: close 32Content-Type: text/html 33Funny-head: yesyes 34 35-foo- 36</data> 37</reply> 38 39# 40# Client-side 41<client> 42<server> 43http 44</server> 45 46# requires debug so that it can use the DoH server without https 47# requires IPv6 so that we can assume and compare both DoH requests 48 49<features> 50Debug 51DoH 52IPv6 53</features> 54<name> 55HTTP GET using DoH (with HTTPS RR) 56</name> 57<command> 58http://foo.example.com:%HTTPPORT/%TESTNUMBER --doh-url http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001 59</command> 60</client> 61 62# 63# Verify data after the test has been "shot" 64<verify> 65 66# To make the test ignore the order of the two outgoing DoH requests, strip 67# the family byte 68 69<strippart> 70s/com\x00\x00(\x1c|\x01)/com-00-00!/g; 71</strippart> 72<protocol> 73%if HTTPSRR 74POST /%TESTNUMBER0001 HTTP/1.1 75Host: %HOSTIP:%HTTPPORT 76Accept: */* 77Content-Type: application/dns-message 78Content-Length: 33 79 80%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 81Host: %HOSTIP:%HTTPPORT 82Accept: */* 83Content-Type: application/dns-message 84Content-Length: 33 85 86%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 87Host: %HOSTIP:%HTTPPORT 88Accept: */* 89Content-Type: application/dns-message 90Content-Length: 47 91 92%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 93Host: foo.example.com:%HTTPPORT 94User-Agent: curl/%VERSION 95Accept: */* 96 97%else 98POST /%TESTNUMBER0001 HTTP/1.1 99Host: %HOSTIP:%HTTPPORT 100Accept: */* 101Content-Type: application/dns-message 102Content-Length: 33 103 104%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 105Host: %HOSTIP:%HTTPPORT 106Accept: */* 107Content-Type: application/dns-message 108Content-Length: 33 109 110%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 111Host: foo.example.com:%HTTPPORT 112User-Agent: curl/%VERSION 113Accept: */* 114 115%endif 116</protocol> 117</verify> 118</testcase> 119