test1702 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP HEAD
  6. HTTP/2
  7. </keywords>
  8. </info>
  9. #
  10. # Server-side
  11. <reply>
  12. <data nocheck="yes">
  13. HTTP/1.1 200 OK
  14. Date: Thu, 09 Nov 2010 14:49:00 GMT
  15. Server: test-server/fake
  16. Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
  17. ETag: "21025-dc7-39462498"
  18. Accept-Ranges: bytes
  19. Content-Length: 6
  20. Connection: close
  21. Content-Type: text/html
  22. Funny-head: yesyes
  23. </data>
  24. </reply>
  25. #
  26. # Client-side
  27. <client>
  28. <server>
  29. http
  30. http/2
  31. </server>
  32. <name>
  33. HTTP/2 HEAD with Upgrade:
  34. </name>
  35. <command>
  36. http://%HOSTIP:%HTTP2PORT/1702 --http2 --head
  37. </command>
  38. </client>
  39. #
  40. # Verify data after the test has been "shot"
  41. <verify>
  42. <strip>
  43. ^User-Agent:.*
  44. ^X-Forwarded-Proto:.*
  45. ^Via:.*
  46. </strip>
  47. <protocol>
  48. HEAD /1702 HTTP/1.1
  49. Host: %HOSTIP:%HTTP2PORT
  50. Accept: */*
  51. </protocol>
  52. <stdout>
  53. HTTP/1.1 101 Switching Protocols
  54. Connection: Upgrade
  55. Upgrade: h2c
  56. HTTP/2 200
  57. date: Thu, 09 Nov 2010 14:49:00 GMT
  58. last-modified: Tue, 13 Jun 2000 12:10:00 GMT
  59. etag: "21025-dc7-39462498"
  60. accept-ranges: bytes
  61. content-length: 6
  62. content-type: text/html
  63. funny-head: yesyes
  64. server: cut-out
  65. via: 1.1 nghttpx
  66. </stdout>
  67. <stripfile>
  68. s/^server:.*/server: cut-out /
  69. </stripfile>
  70. </verify>
  71. </testcase>