test1331 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <testcase>
  2. # Test case inspired by this question on stackoverflow:
  3. #
  4. # https://stackoverflow.com/questions/10017165/use-libcurl-with-bluecoat-cookie-proxy
  5. #
  6. <info>
  7. <keywords>
  8. HTTP
  9. HTTP GET
  10. HTTP proxy
  11. cookies
  12. </keywords>
  13. </info>
  14. # Server-side
  15. <reply>
  16. <data>
  17. HTTP/1.1 407 Me not know you swsbounce
  18. Date: Tue, 25 Sep 2001 19:37:44 GMT
  19. Content-Type: text/html
  20. Set-Cookie: proxycookie=weirdo; Path=/
  21. Cache-control: private
  22. Content-Length: 62
  23. Proxy-Authenticate: Basic realm="moo on you"
  24. This server reply is for testing a simple cookie test case...
  25. </data>
  26. <data1>
  27. HTTP/1.1 200 Fine!
  28. Content-Type: text/html
  29. Content-Length: 6
  30. hello
  31. </data1>
  32. <datacheck>
  33. HTTP/1.1 407 Me not know you swsbounce
  34. Date: Tue, 25 Sep 2001 19:37:44 GMT
  35. Content-Type: text/html
  36. Set-Cookie: proxycookie=weirdo; Path=/
  37. Cache-control: private
  38. Content-Length: 62
  39. Proxy-Authenticate: Basic realm="moo on you"
  40. HTTP/1.1 200 Fine!
  41. Content-Type: text/html
  42. Content-Length: 6
  43. hello
  44. </datacheck>
  45. </reply>
  46. # Client-side
  47. <client>
  48. <server>
  49. http
  50. </server>
  51. <name>
  52. HTTP --proxy-anyauth and 407 with cookies
  53. </name>
  54. <command>
  55. -U myname:mypassword -x %HOSTIP:%HTTPPORT http://z.x.com/%TESTNUMBER --proxy-anyauth -c log/dump%TESTNUMBER
  56. </command>
  57. <features>
  58. proxy
  59. </features>
  60. </client>
  61. # Verify data after the test has been "shot"
  62. <verify>
  63. <protocol>
  64. GET http://z.x.com/%TESTNUMBER HTTP/1.1
  65. Host: z.x.com
  66. User-Agent: curl/%VERSION
  67. Accept: */*
  68. Proxy-Connection: Keep-Alive
  69. GET http://z.x.com/%TESTNUMBER HTTP/1.1
  70. Host: z.x.com
  71. Proxy-Authorization: Basic bXluYW1lOm15cGFzc3dvcmQ=
  72. User-Agent: curl/%VERSION
  73. Accept: */*
  74. Proxy-Connection: Keep-Alive
  75. Cookie: proxycookie=weirdo
  76. </protocol>
  77. </verify>
  78. </testcase>