test1078 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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: Tue, 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.%TESTNUMBER:%HTTPPORT/we/want/that/page/%TESTNUMBER http://%HOSTIP.%TESTNUMBER:%HTTPPORT/we/want/that/page/%TESTNUMBER
  42. </command>
  43. <features>
  44. proxy
  45. </features>
  46. </client>
  47. #
  48. # Verify data after the test has been "shot"
  49. <verify>
  50. <proxy>
  51. CONNECT %HOSTIP.%TESTNUMBER:%HTTPPORT HTTP/1.0
  52. Host: %HOSTIP.%TESTNUMBER:%HTTPPORT
  53. User-Agent: curl/%VERSION
  54. Proxy-Connection: Keep-Alive
  55. </proxy>
  56. <protocol>
  57. GET /we/want/that/page/%TESTNUMBER HTTP/1.1
  58. Host: %HOSTIP.%TESTNUMBER:%HTTPPORT
  59. User-Agent: curl/%VERSION
  60. Accept: */*
  61. GET /we/want/that/page/%TESTNUMBER HTTP/1.0
  62. Host: %HOSTIP.%TESTNUMBER:%HTTPPORT
  63. User-Agent: curl/%VERSION
  64. Accept: */*
  65. </protocol>
  66. <stdout>
  67. HTTP/1.1 200 Mighty fine indeed
  68. Server: test tunnel 2000
  69. HTTP/1.0 200 OK
  70. Date: Tue, 09 Nov 2010 14:49:00 GMT
  71. Server: test-server/fake
  72. Content-Type: text/html
  73. Funny-head: yesyes
  74. Content-Length: 9
  75. Connection: keep-alive
  76. contents
  77. HTTP/1.0 200 OK
  78. Date: Tue, 09 Nov 2010 14:49:00 GMT
  79. Server: test-server/fake
  80. Content-Type: text/html
  81. Funny-head: yesyes
  82. Content-Length: 9
  83. Connection: keep-alive
  84. contents
  85. </stdout>
  86. </verify>
  87. </testcase>