test275 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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: Thu, 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: Thu, 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.275:%HTTPPORT/we/want/that/page/275 -p -x %HOSTIP:%PROXYPORT --user iam:myself --proxy-user youare:yourself http://remotesite.com.275:%HTTPPORT/we/want/that/page/275
  51. </command>
  52. </client>
  53. #
  54. # Verify data after the test has been "shot"
  55. <verify>
  56. <strip>
  57. ^User-Agent:.*
  58. </strip>
  59. <proxy>
  60. CONNECT remotesite.com.275:%HTTPPORT HTTP/1.1
  61. Host: remotesite.com.275:%HTTPPORT
  62. Proxy-Authorization: Basic eW91YXJlOnlvdXJzZWxm
  63. User-Agent: curl/7.10.7-pre2 (i686-pc-linux-gnu) libcurl/7.10.7-pre2 OpenSSL/0.9.7a zlib/1.1.3
  64. Proxy-Connection: Keep-Alive
  65. </proxy>
  66. <protocol>
  67. GET /we/want/that/page/275 HTTP/1.1
  68. Authorization: Basic aWFtOm15c2VsZg==
  69. Host: remotesite.com.275:%HTTPPORT
  70. Accept: */*
  71. GET /we/want/that/page/275 HTTP/1.1
  72. Authorization: Basic aWFtOm15c2VsZg==
  73. Host: remotesite.com.275:%HTTPPORT
  74. Accept: */*
  75. </protocol>
  76. </verify>
  77. </testcase>