test2100 1.9 KB

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