test2050 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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: Tue, 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: Tue, 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.%TESTNUMBER/%TESTNUMBER --connect-to ::connect.example.com.%TESTNUMBER:%HTTPPORT -x %HOSTIP:%PROXYPORT
  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 connect.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1
  56. Host: connect.example.com.%TESTNUMBER:%HTTPPORT
  57. User-Agent: curl/%VERSION
  58. Proxy-Connection: Keep-Alive
  59. </proxy>
  60. <protocol>
  61. GET /%TESTNUMBER HTTP/1.1
  62. Host: www.example.com.%TESTNUMBER
  63. User-Agent: curl/%VERSION
  64. Accept: */*
  65. </protocol>
  66. </verify>
  67. </testcase>