test1331 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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 %LOGDIR/dump%TESTNUMBER
  56. </command>
  57. <features>
  58. cookies
  59. proxy
  60. </features>
  61. </client>
  62. # Verify data after the test has been "shot"
  63. <verify>
  64. <protocol>
  65. GET http://z.x.com/%TESTNUMBER HTTP/1.1
  66. Host: z.x.com
  67. User-Agent: curl/%VERSION
  68. Accept: */*
  69. Proxy-Connection: Keep-Alive
  70. GET http://z.x.com/%TESTNUMBER HTTP/1.1
  71. Host: z.x.com
  72. Proxy-Authorization: Basic bXluYW1lOm15cGFzc3dvcmQ=
  73. User-Agent: curl/%VERSION
  74. Accept: */*
  75. Proxy-Connection: Keep-Alive
  76. Cookie: proxycookie=weirdo
  77. </protocol>
  78. </verify>
  79. </testcase>