test167 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. proxy
  41. </features>
  42. <name>
  43. HTTP with proxy-requiring-Basic to site-requiring-Digest
  44. </name>
  45. <command>
  46. http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER --proxy http://%HOSTIP:%HTTPPORT --proxy-user foo:bar --digest --user digest:alot
  47. </command>
  48. </client>
  49. # Verify data after the test has been "shot"
  50. <verify>
  51. <protocol>
  52. GET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1
  53. Host: data.from.server.requiring.digest.hohoho.com
  54. Proxy-Authorization: Basic Zm9vOmJhcg==
  55. User-Agent: curl/%VERSION
  56. Accept: */*
  57. Proxy-Connection: Keep-Alive
  58. GET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1
  59. Host: data.from.server.requiring.digest.hohoho.com
  60. Proxy-Authorization: Basic Zm9vOmJhcg==
  61. Authorization: Digest username="digest", realm="weirdorealm", nonce="12345", uri="/%TESTNUMBER", response="13c7c02a252cbe1c46d8669898a3be26"
  62. User-Agent: curl/%VERSION
  63. Accept: */*
  64. Proxy-Connection: Keep-Alive
  65. </protocol>
  66. </verify>
  67. </testcase>