test275 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP CONNECT
  7. HTTP Basic auth
  8. HTTP proxy
  9. HTTP proxy Basic auth
  10. proxytunnel
  11. </keywords>
  12. </info>
  13. #
  14. # Server-side
  15. <reply>
  16. <connect>
  17. HTTP/1.1 200 OK
  18. Connected-fine: sure
  19. </connect>
  20. <data>
  21. HTTP/1.1 200 OK
  22. Date: Tue, 09 Nov 2010 14:49:00 GMT
  23. Server: test-server/fake
  24. Content-Type: text/html
  25. Content-Length: 9
  26. contents
  27. </data>
  28. <datacheck>
  29. HTTP/1.1 200 OK
  30. Connected-fine: sure
  31. HTTP/1.1 200 OK
  32. Date: Tue, 09 Nov 2010 14:49:00 GMT
  33. Server: test-server/fake
  34. Content-Type: text/html
  35. Content-Length: 9
  36. contents
  37. </datacheck>
  38. </reply>
  39. #
  40. # Client-side
  41. <client>
  42. <server>
  43. http
  44. http-proxy
  45. </server>
  46. <name>
  47. HTTP CONNECT with proxytunnel getting two URLs from the same host
  48. </name>
  49. <command>
  50. http://remotesite.com.%TESTNUMBER:%HTTPPORT/we/want/that/page/%TESTNUMBER -p -x %HOSTIP:%PROXYPORT --user iam:myself --proxy-user youare:yourself http://remotesite.com.%TESTNUMBER:%HTTPPORT/we/want/that/page/%TESTNUMBER
  51. </command>
  52. <features>
  53. proxy
  54. </features>
  55. </client>
  56. #
  57. # Verify data after the test has been "shot"
  58. <verify>
  59. <proxy>
  60. CONNECT remotesite.com.%TESTNUMBER:%HTTPPORT HTTP/1.1
  61. Host: remotesite.com.%TESTNUMBER:%HTTPPORT
  62. Proxy-Authorization: Basic eW91YXJlOnlvdXJzZWxm
  63. User-Agent: curl/%VERSION
  64. Proxy-Connection: Keep-Alive
  65. </proxy>
  66. <protocol>
  67. GET /we/want/that/page/%TESTNUMBER HTTP/1.1
  68. Host: remotesite.com.%TESTNUMBER:%HTTPPORT
  69. Authorization: Basic aWFtOm15c2VsZg==
  70. User-Agent: curl/%VERSION
  71. Accept: */*
  72. GET /we/want/that/page/%TESTNUMBER HTTP/1.1
  73. Host: remotesite.com.%TESTNUMBER:%HTTPPORT
  74. Authorization: Basic aWFtOm15c2VsZg==
  75. User-Agent: curl/%VERSION
  76. Accept: */*
  77. </protocol>
  78. </verify>
  79. </testcase>