test1078 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP/1.0
  6. HTTP GET
  7. HTTP CONNECT
  8. HTTP proxy
  9. proxytunnel
  10. </keywords>
  11. </info>
  12. #
  13. # Server-side
  14. <reply>
  15. <connect>
  16. HTTP/1.1 200 Mighty fine indeed
  17. Server: test tunnel 2000
  18. </connect>
  19. <data nocheck="yes">
  20. HTTP/1.0 200 OK
  21. Date: Thu, 09 Nov 2010 14:49:00 GMT
  22. Server: test-server/fake
  23. Content-Type: text/html
  24. Funny-head: yesyes
  25. Content-Length: 9
  26. Connection: keep-alive
  27. contents
  28. </data>
  29. </reply>
  30. #
  31. # Client-side
  32. <client>
  33. <server>
  34. http
  35. http-proxy
  36. </server>
  37. <name>
  38. HTTP 1.0 CONNECT with proxytunnel and downgrade GET to HTTP/1.0
  39. </name>
  40. <command>
  41. --proxy1.0 %HOSTIP:%PROXYPORT -p http://%HOSTIP.1078:%HTTPPORT/we/want/that/page/1078 http://%HOSTIP.1078:%HTTPPORT/we/want/that/page/1078
  42. </command>
  43. </client>
  44. #
  45. # Verify data after the test has been "shot"
  46. <verify>
  47. <strip>
  48. ^User-Agent:.*
  49. </strip>
  50. <proxy>
  51. CONNECT %HOSTIP.1078:%HTTPPORT HTTP/1.0
  52. Host: %HOSTIP.1078:%HTTPPORT
  53. Proxy-Connection: Keep-Alive
  54. </proxy>
  55. <protocol>
  56. GET /we/want/that/page/1078 HTTP/1.1
  57. Host: %HOSTIP.1078:%HTTPPORT
  58. Accept: */*
  59. GET /we/want/that/page/1078 HTTP/1.0
  60. Host: %HOSTIP.1078:%HTTPPORT
  61. Accept: */*
  62. </protocol>
  63. <stdout>
  64. HTTP/1.1 200 Mighty fine indeed
  65. Server: test tunnel 2000
  66. HTTP/1.0 200 OK
  67. Date: Thu, 09 Nov 2010 14:49:00 GMT
  68. Server: test-server/fake
  69. Content-Type: text/html
  70. Funny-head: yesyes
  71. Content-Length: 9
  72. Connection: keep-alive
  73. contents
  74. HTTP/1.0 200 OK
  75. Date: Thu, 09 Nov 2010 14:49:00 GMT
  76. Server: test-server/fake
  77. Content-Type: text/html
  78. Funny-head: yesyes
  79. Content-Length: 9
  80. Connection: keep-alive
  81. contents
  82. </stdout>
  83. </verify>
  84. </testcase>