2
0

test1184 1.9 KB

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