test2100 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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: Thu, 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. # this requires debug so that it can use the DOH server without https
  41. # Forces IPv4 so that it only sends one DoH request, which is a little lame
  42. # but avoids the problem when they get sent in different order and ruins our
  43. # protocol check!
  44. <features>
  45. debug
  46. http/2
  47. </features>
  48. <name>
  49. HTTP GET using DOH
  50. </name>
  51. <command>
  52. http://foo.example.com:%HTTPPORT/2100 -4 --doh-url http://%HOSTIP:%HTTPPORT/21000001
  53. </command>
  54. </client>
  55. #
  56. # Verify data after the test has been "shot"
  57. <verify>
  58. <strip>
  59. ^User-Agent:.*
  60. </strip>
  61. <protocol>
  62. POST /21000001 HTTP/1.1
  63. Host: 127.0.0.1:8990
  64. Accept: */*
  65. Content-Type: application/dns-message
  66. Content-Length: 33
  67. ����������fooexamplecom���GET /2100 HTTP/1.1
  68. Host: foo.example.com:8990
  69. Accept: */*
  70. </protocol>
  71. </verify>
  72. </testcase>