test2052 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. CURLOPT_CONNECT_TO
  7. --resolve
  8. </keywords>
  9. </info>
  10. #
  11. # Server-side
  12. <reply>
  13. <data nocheck="yes">
  14. HTTP/1.1 200 OK
  15. Date: Tue, 09 Nov 2010 14:49:00 GMT
  16. Content-Length: 3
  17. Content-Type: text/plain
  18. OK
  19. </data>
  20. </reply>
  21. #
  22. # Client-side
  23. <client>
  24. <server>
  25. http
  26. </server>
  27. <name>
  28. Connect to specific host: Do not mix connections with and without a "connect to host"
  29. </name>
  30. <command>
  31. http://www.example.com:%HTTPPORT/%TESTNUMBER --resolve www.example.com:%HTTPPORT:%HOSTIP -w "%{num_connects}\n" --next --resolve -www.example.com:%HTTPPORT --connect-to ::%HOSTIP:%HTTPPORT http://www.example.com:%HTTPPORT/%TESTNUMBER -w "%{num_connects}\n"
  32. </command>
  33. </client>
  34. #
  35. # Verify data after the test has been "shot"
  36. <verify>
  37. <protocol>
  38. GET /%TESTNUMBER HTTP/1.1
  39. Host: www.example.com:%HTTPPORT
  40. User-Agent: curl/%VERSION
  41. Accept: */*
  42. GET /%TESTNUMBER HTTP/1.1
  43. Host: www.example.com:%HTTPPORT
  44. User-Agent: curl/%VERSION
  45. Accept: */*
  46. </protocol>
  47. <stdout>
  48. HTTP/1.1 200 OK
  49. Date: Tue, 09 Nov 2010 14:49:00 GMT
  50. Content-Length: 3
  51. Content-Type: text/plain
  52. OK
  53. 1
  54. OK
  55. 1
  56. </stdout>
  57. </verify>
  58. </testcase>