test275 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. <data>
  17. HTTP/1.1 200 OK
  18. Date: Thu, 09 Nov 2010 14:49:00 GMT
  19. Server: test-server/fake
  20. Content-Type: text/html
  21. Content-Length: 9
  22. contents
  23. </data>
  24. <datacheck>
  25. HTTP/1.1 200 Mighty fine indeed
  26. HTTP/1.1 200 OK
  27. Date: Thu, 09 Nov 2010 14:49:00 GMT
  28. Server: test-server/fake
  29. Content-Type: text/html
  30. Content-Length: 9
  31. contents
  32. </datacheck>
  33. </reply>
  34. #
  35. # Client-side
  36. <client>
  37. <server>
  38. http
  39. http-proxy
  40. </server>
  41. <name>
  42. HTTP CONNECT with proxytunnel getting two URLs from the same host
  43. </name>
  44. <command>
  45. http://remotesite.com:%HTTPPORT/we/want/that/page/275 -p -x %HOSTIP:%PROXYPORT --user iam:myself --proxy-user youare:yourself http://remotesite.com:%HTTPPORT/we/want/that/page/275
  46. </command>
  47. </client>
  48. #
  49. # Verify data after the test has been "shot"
  50. <verify>
  51. <strip>
  52. ^User-Agent:.*
  53. </strip>
  54. <proxy>
  55. CONNECT remotesite.com:%HTTPPORT HTTP/1.1
  56. Host: remotesite.com:%HTTPPORT
  57. Proxy-Authorization: Basic eW91YXJlOnlvdXJzZWxm
  58. User-Agent: curl/7.10.7-pre2 (i686-pc-linux-gnu) libcurl/7.10.7-pre2 OpenSSL/0.9.7a zlib/1.1.3
  59. Proxy-Connection: Keep-Alive
  60. </proxy>
  61. <protocol>
  62. GET /we/want/that/page/275 HTTP/1.1
  63. Authorization: Basic aWFtOm15c2VsZg==
  64. Host: remotesite.com:%HTTPPORT
  65. Accept: */*
  66. GET /we/want/that/page/275 HTTP/1.1
  67. Authorization: Basic aWFtOm15c2VsZg==
  68. Host: remotesite.com:%HTTPPORT
  69. Accept: */*
  70. </protocol>
  71. </verify>
  72. </testcase>