1*6236dae4SAndroid Build Coastguard Worker<testcase> 2*6236dae4SAndroid Build Coastguard Worker<info> 3*6236dae4SAndroid Build Coastguard Worker<keywords> 4*6236dae4SAndroid Build Coastguard WorkerHTTP 5*6236dae4SAndroid Build Coastguard WorkerHTTP GET 6*6236dae4SAndroid Build Coastguard WorkerDOH 7*6236dae4SAndroid Build Coastguard Worker</keywords> 8*6236dae4SAndroid Build Coastguard Worker</info> 9*6236dae4SAndroid Build Coastguard Worker 10*6236dae4SAndroid Build Coastguard Worker# 11*6236dae4SAndroid Build Coastguard Worker# Server-side 12*6236dae4SAndroid Build Coastguard Worker<reply> 13*6236dae4SAndroid Build Coastguard Worker 14*6236dae4SAndroid Build Coastguard Worker# This is the DoH response for foo.example.com A 127.0.0.1. This requires that 15*6236dae4SAndroid Build Coastguard Worker# the test server is accessible at that address! 16*6236dae4SAndroid Build Coastguard Worker 17*6236dae4SAndroid Build Coastguard Worker<data1 base64="yes"> 18*6236dae4SAndroid Build Coastguard WorkerSFRUUC8xLjEgMjAwIE9LCkRhdGU6IFRodSwgMDkgTm92IDIwMTAgMTQ6NDk6MDAgR01UClNlcnZl 19*6236dae4SAndroid Build Coastguard WorkercjogdGVzdC1zZXJ2ZXIvZmFrZQpDb25uZWN0aW9uOiBjbG9zZQpDb250ZW50LVR5cGU6IGFwcGxp 20*6236dae4SAndroid Build Coastguard WorkerY2F0aW9uL2Rucy1tZXNzYWdlCkNvbnRlbnQtTGVuZ3RoOiA0OQoKAAABAAABAAEAAAAAA2Zvbwdl 21*6236dae4SAndroid Build Coastguard WorkereGFtcGxlA2NvbQAAAQABwAwAAQABAAAANwAEfwAAAQ== 22*6236dae4SAndroid Build Coastguard Worker</data1> 23*6236dae4SAndroid Build Coastguard Worker<data> 24*6236dae4SAndroid Build Coastguard WorkerHTTP/1.1 200 OK 25*6236dae4SAndroid Build Coastguard WorkerDate: Tue, 09 Nov 2010 14:49:00 GMT 26*6236dae4SAndroid Build Coastguard WorkerServer: test-server/fake 27*6236dae4SAndroid Build Coastguard WorkerLast-Modified: Tue, 13 Jun 2000 12:10:00 GMT 28*6236dae4SAndroid Build Coastguard WorkerETag: "21025-dc7-39462498" 29*6236dae4SAndroid Build Coastguard WorkerAccept-Ranges: bytes 30*6236dae4SAndroid Build Coastguard WorkerContent-Length: 6 31*6236dae4SAndroid Build Coastguard WorkerConnection: close 32*6236dae4SAndroid Build Coastguard WorkerContent-Type: text/html 33*6236dae4SAndroid Build Coastguard WorkerFunny-head: yesyes 34*6236dae4SAndroid Build Coastguard Worker 35*6236dae4SAndroid Build Coastguard Worker-foo- 36*6236dae4SAndroid Build Coastguard Worker</data> 37*6236dae4SAndroid Build Coastguard Worker</reply> 38*6236dae4SAndroid Build Coastguard Worker 39*6236dae4SAndroid Build Coastguard Worker# 40*6236dae4SAndroid Build Coastguard Worker# Client-side 41*6236dae4SAndroid Build Coastguard Worker<client> 42*6236dae4SAndroid Build Coastguard Worker<server> 43*6236dae4SAndroid Build Coastguard Workerhttp 44*6236dae4SAndroid Build Coastguard Worker</server> 45*6236dae4SAndroid Build Coastguard Worker 46*6236dae4SAndroid Build Coastguard Worker# requires debug so that it can use the DoH server without https 47*6236dae4SAndroid Build Coastguard Worker# requires IPv6 so that we can assume and compare both DoH requests 48*6236dae4SAndroid Build Coastguard Worker 49*6236dae4SAndroid Build Coastguard Worker<features> 50*6236dae4SAndroid Build Coastguard WorkerDebug 51*6236dae4SAndroid Build Coastguard WorkerDoH 52*6236dae4SAndroid Build Coastguard WorkerIPv6 53*6236dae4SAndroid Build Coastguard Worker</features> 54*6236dae4SAndroid Build Coastguard Worker<name> 55*6236dae4SAndroid Build Coastguard WorkerHTTP GET using DoH 56*6236dae4SAndroid Build Coastguard Worker</name> 57*6236dae4SAndroid Build Coastguard Worker<command> 58*6236dae4SAndroid Build Coastguard Workerhttp://foo.example.com:%HTTPPORT/%TESTNUMBER --doh-url http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001 59*6236dae4SAndroid Build Coastguard Worker</command> 60*6236dae4SAndroid Build Coastguard Worker</client> 61*6236dae4SAndroid Build Coastguard Worker 62*6236dae4SAndroid Build Coastguard Worker# 63*6236dae4SAndroid Build Coastguard Worker# Verify data after the test has been "shot" 64*6236dae4SAndroid Build Coastguard Worker<verify> 65*6236dae4SAndroid Build Coastguard Worker 66*6236dae4SAndroid Build Coastguard Worker# To make the test ignore the order of the two outgoing DoH requests, strip 67*6236dae4SAndroid Build Coastguard Worker# the family byte 68*6236dae4SAndroid Build Coastguard Worker 69*6236dae4SAndroid Build Coastguard Worker<strippart> 70*6236dae4SAndroid Build Coastguard Workers/com\x00\x00(\x1c|\x01)/com-00-00!/g; 71*6236dae4SAndroid Build Coastguard Worker</strippart> 72*6236dae4SAndroid Build Coastguard Worker<protocol> 73*6236dae4SAndroid Build Coastguard WorkerPOST /%TESTNUMBER0001 HTTP/1.1 74*6236dae4SAndroid Build Coastguard WorkerHost: %HOSTIP:%HTTPPORT 75*6236dae4SAndroid Build Coastguard WorkerAccept: */* 76*6236dae4SAndroid Build Coastguard WorkerContent-Type: application/dns-message 77*6236dae4SAndroid Build Coastguard WorkerContent-Length: 33 78*6236dae4SAndroid Build Coastguard Worker 79*6236dae4SAndroid Build Coastguard Worker%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 80*6236dae4SAndroid Build Coastguard WorkerHost: %HOSTIP:%HTTPPORT 81*6236dae4SAndroid Build Coastguard WorkerAccept: */* 82*6236dae4SAndroid Build Coastguard WorkerContent-Type: application/dns-message 83*6236dae4SAndroid Build Coastguard WorkerContent-Length: 33 84*6236dae4SAndroid Build Coastguard Worker 85*6236dae4SAndroid Build Coastguard Worker%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 86*6236dae4SAndroid Build Coastguard WorkerHost: foo.example.com:%HTTPPORT 87*6236dae4SAndroid Build Coastguard WorkerUser-Agent: curl/%VERSION 88*6236dae4SAndroid Build Coastguard WorkerAccept: */* 89*6236dae4SAndroid Build Coastguard Worker 90*6236dae4SAndroid Build Coastguard Worker</protocol> 91*6236dae4SAndroid Build Coastguard Worker</verify> 92*6236dae4SAndroid Build Coastguard Worker</testcase> 93