test1701 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP POST
  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. -foo-
  24. </data>
  25. </reply>
  26. #
  27. # Client-side
  28. <client>
  29. <server>
  30. http
  31. http/2
  32. </server>
  33. <name>
  34. HTTP/2 POST with Upgrade:
  35. </name>
  36. <command>
  37. http://%HOSTIP:%HTTP2PORT/1701 --http2 -d "datatosend"
  38. </command>
  39. </client>
  40. #
  41. # Verify data after the test has been "shot"
  42. <verify>
  43. <strip>
  44. ^User-Agent:.*
  45. ^X-Forwarded-Proto:.*
  46. ^Via:.*
  47. </strip>
  48. <protocol nonewline="yes">
  49. POST /1701 HTTP/1.1
  50. Host: %HOSTIP:%HTTP2PORT
  51. Accept: */*
  52. Content-Length: 10
  53. Content-Type: application/x-www-form-urlencoded
  54. datatosend
  55. </protocol>
  56. <stdout>
  57. HTTP/1.1 101 Switching Protocols
  58. Connection: Upgrade
  59. Upgrade: h2c
  60. HTTP/2 200
  61. date: Thu, 09 Nov 2010 14:49:00 GMT
  62. last-modified: Tue, 13 Jun 2000 12:10:00 GMT
  63. etag: "21025-dc7-39462498"
  64. accept-ranges: bytes
  65. content-length: 6
  66. content-type: text/html
  67. funny-head: yesyes
  68. server: cut-out
  69. via: 1.1 nghttpx
  70. -foo-
  71. </stdout>
  72. <stripfile>
  73. s/^server:.*/server: cut-out /
  74. </stripfile>
  75. </verify>
  76. </testcase>