test2052 1.0 KB

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