test80 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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 swsclose
  20. Content-Type: text/html
  21. Funny-head: yesyes
  22. Content-Length: 9
  23. contents
  24. </data>
  25. <connect>
  26. HTTP/1.1 200 Mighty fine indeed
  27. </connect>
  28. <datacheck>
  29. HTTP/1.1 200 Mighty fine indeed
  30. HTTP/1.1 200 OK
  31. Date: Thu, 09 Nov 2010 14:49:00 GMT
  32. Server: test-server/fake swsclose
  33. Content-Type: text/html
  34. Funny-head: yesyes
  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 1.0 CONNECT with proxytunnel and proxy+host Basic authentication
  48. </name>
  49. <command>
  50. http://test.80:%HTTPPORT/we/want/that/page/80 -p --proxy1.0 %HOSTIP:%PROXYPORT --user iam:myself --proxy-user youare:yourself
  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 test.80:%HTTPPORT HTTP/1.0
  61. Host: test.80:%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/80 HTTP/1.1
  68. Host: test.80:%HTTPPORT
  69. Authorization: Basic aWFtOm15c2VsZg==
  70. User-Agent: curl/7.10.7-pre2 (i686-pc-linux-gnu) libcurl/7.10.7-pre2 OpenSSL/0.9.7a zlib/1.1.3
  71. Accept: */*
  72. </protocol>
  73. </verify>
  74. </testcase>