test167 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP proxy
  7. HTTP proxy Basic auth
  8. HTTP Digest auth
  9. </keywords>
  10. </info>
  11. # Server-side
  12. <reply>
  13. <data>
  14. HTTP/1.1 401 Authorization Required swsclose
  15. WWW-Authenticate: Digest realm="weirdorealm", nonce="12345"
  16. </data>
  17. <data1000>
  18. HTTP/1.1 200 OK swsclose
  19. Server: no
  20. Content-Length: 15
  21. Nice auth sir!
  22. </data1000>
  23. <datacheck>
  24. HTTP/1.1 401 Authorization Required swsclose
  25. WWW-Authenticate: Digest realm="weirdorealm", nonce="12345"
  26. HTTP/1.1 200 OK swsclose
  27. Server: no
  28. Content-Length: 15
  29. Nice auth sir!
  30. </datacheck>
  31. </reply>
  32. # Client-side
  33. <client>
  34. <server>
  35. http
  36. </server>
  37. <features>
  38. !SSPI
  39. crypto
  40. </features>
  41. <name>
  42. HTTP with proxy-requiring-Basic to site-requiring-Digest
  43. </name>
  44. <command>
  45. http://data.from.server.requiring.digest.hohoho.com/167 --proxy http://%HOSTIP:%HTTPPORT --proxy-user foo:bar --digest --user digest:alot
  46. </command>
  47. </client>
  48. # Verify data after the test has been "shot"
  49. <verify>
  50. <strip>
  51. ^User-Agent: curl/.*
  52. </strip>
  53. <protocol>
  54. GET http://data.from.server.requiring.digest.hohoho.com/167 HTTP/1.1
  55. Proxy-Authorization: Basic Zm9vOmJhcg==
  56. User-Agent: curl/7.12.0-CVS (i686-pc-linux-gnu) libcurl/7.12.0-CVS OpenSSL/0.9.6b zlib/1.1.4 c-ares/1.2.0 libidn/0.4.3
  57. Host: data.from.server.requiring.digest.hohoho.com
  58. Accept: */*
  59. Proxy-Connection: Keep-Alive
  60. GET http://data.from.server.requiring.digest.hohoho.com/167 HTTP/1.1
  61. Proxy-Authorization: Basic Zm9vOmJhcg==
  62. Authorization: Digest username="digest", realm="weirdorealm", nonce="12345", uri="/167", response="13c7c02a252cbe1c46d8669898a3be26"
  63. User-Agent: curl/7.12.0-CVS (i686-pc-linux-gnu) libcurl/7.12.0-CVS OpenSSL/0.9.6b zlib/1.1.4 c-ares/1.2.0 libidn/0.4.3
  64. Host: data.from.server.requiring.digest.hohoho.com
  65. Accept: */*
  66. Proxy-Connection: Keep-Alive
  67. </protocol>
  68. </verify>
  69. </testcase>