test1700 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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: 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. -foo-
  24. </data>
  25. <data1>
  26. HTTP/1.1 200 OK
  27. Date: Tue, 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. <features>
  38. h2c
  39. </features>
  40. <server>
  41. http
  42. http/2
  43. </server>
  44. <name>
  45. HTTP/2 GET with Upgrade:
  46. </name>
  47. <command>
  48. http://%HOSTIP:%HTTP2PORT/%TESTNUMBER --http2 http://%HOSTIP:%HTTP2PORT/%TESTNUMBER0001
  49. </command>
  50. </client>
  51. #
  52. # Verify data after the test has been "shot"
  53. <verify>
  54. <strip>
  55. ^X-Forwarded-Proto:.*
  56. ^Via:.*
  57. </strip>
  58. <protocol>
  59. GET /%TESTNUMBER HTTP/1.1
  60. Host: %HOSTIP:%HTTP2PORT
  61. User-Agent: curl/%VERSION
  62. Accept: */*
  63. GET /%TESTNUMBER0001 HTTP/1.1
  64. Host: %HOSTIP:%HTTP2PORT
  65. User-Agent: curl/%VERSION
  66. Accept: */*
  67. </protocol>
  68. <stdout>
  69. HTTP/1.1 101 Switching Protocols
  70. Connection: Upgrade
  71. Upgrade: h2c
  72. HTTP/2 200
  73. date: Tue, 09 Nov 2010 14:49:00 GMT
  74. last-modified: Tue, 13 Jun 2000 12:10:00 GMT
  75. etag: "21025-dc7-39462498"
  76. accept-ranges: bytes
  77. content-length: 6
  78. content-type: text/html
  79. funny-head: yesyes
  80. via: 1.1 nghttpx
  81. -foo-
  82. HTTP/2 200
  83. date: Tue, 09 Nov 2010 14:49:00 GMT
  84. content-length: 6
  85. content-type: text/html
  86. via: 1.1 nghttpx
  87. -maa-
  88. </stdout>
  89. <stripfile>
  90. s/^server: nghttpx.*\r?\n//
  91. </stripfile>
  92. </verify>
  93. </testcase>