test1700 1.5 KB

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