test1702 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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: Tue, 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. <features>
  29. h2c
  30. </features>
  31. <server>
  32. http
  33. http/2
  34. </server>
  35. <name>
  36. HTTP/2 HEAD with Upgrade:
  37. </name>
  38. <command>
  39. http://%HOSTIP:%HTTP2PORT/%TESTNUMBER --http2 --head
  40. </command>
  41. </client>
  42. #
  43. # Verify data after the test has been "shot"
  44. <verify>
  45. <strip>
  46. ^X-Forwarded-Proto:.*
  47. ^Via:.*
  48. </strip>
  49. <protocol>
  50. HEAD /%TESTNUMBER HTTP/1.1
  51. Host: %HOSTIP:%HTTP2PORT
  52. User-Agent: curl/%VERSION
  53. Accept: */*
  54. </protocol>
  55. <stdout>
  56. HTTP/1.1 101 Switching Protocols
  57. Connection: Upgrade
  58. Upgrade: h2c
  59. HTTP/2 200
  60. date: Tue, 09 Nov 2010 14:49:00 GMT
  61. last-modified: Tue, 13 Jun 2000 12:10:00 GMT
  62. etag: "21025-dc7-39462498"
  63. accept-ranges: bytes
  64. content-length: 6
  65. content-type: text/html
  66. funny-head: yesyes
  67. via: 1.1 nghttpx
  68. </stdout>
  69. <stripfile>
  70. s/^server: nghttpx.*\r?\n//
  71. </stripfile>
  72. </verify>
  73. </testcase>