test2050 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP CONNECT
  7. HTTP proxy
  8. proxytunnel
  9. CURLOPT_CONNECT_TO
  10. </keywords>
  11. </info>
  12. #
  13. # Server-side
  14. <reply>
  15. <connect>
  16. HTTP/1.1 200 Connection established
  17. </connect>
  18. <data>
  19. HTTP/1.1 200 OK
  20. Date: Thu, 09 Nov 2010 14:49:00 GMT
  21. Content-Length: 3
  22. Content-Type: text/plain
  23. OK
  24. </data>
  25. <datacheck>
  26. HTTP/1.1 200 Connection established
  27. HTTP/1.1 200 OK
  28. Date: Thu, 09 Nov 2010 14:49:00 GMT
  29. Content-Length: 3
  30. Content-Type: text/plain
  31. OK
  32. </datacheck>
  33. </reply>
  34. #
  35. # Client-side
  36. <client>
  37. <server>
  38. http
  39. http-proxy
  40. </server>
  41. <name>
  42. Connect to specific host via HTTP proxy (switch to tunnel mode automatically)
  43. </name>
  44. <command>
  45. http://www.example.com.2050/2050 --connect-to ::connect.example.com.2050:%HTTPPORT -x %HOSTIP:%PROXYPORT
  46. </command>
  47. </client>
  48. #
  49. # Verify data after the test has been "shot"
  50. <verify>
  51. <strip>
  52. ^User-Agent:.*
  53. </strip>
  54. <proxy>
  55. CONNECT connect.example.com.2050:%HTTPPORT HTTP/1.1
  56. Host: connect.example.com.2050:%HTTPPORT
  57. Proxy-Connection: Keep-Alive
  58. </proxy>
  59. <protocol>
  60. GET /2050 HTTP/1.1
  61. Host: www.example.com.2050
  62. Accept: */*
  63. </protocol>
  64. </verify>
  65. </testcase>