test168 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP proxy
  7. HTTP proxy Digest auth
  8. HTTP Digest auth
  9. </keywords>
  10. </info>
  11. # Server-side
  12. <reply>
  13. # this is returned first since we get no proxy-auth
  14. <data>
  15. HTTP/1.1 407 Authorization Required to proxy me my dear swsclose
  16. Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345"
  17. And you should ignore this data.
  18. </data>
  19. # then this is returned since we get no server-auth
  20. <data1000>
  21. HTTP/1.1 401 Authorization to the remote host as well swsbounce swsclose
  22. WWW-Authenticate: Digest realm="realmweirdo", nonce="123456"
  23. you should ignore this data too
  24. </data1000>
  25. <data1001>
  26. HTTP/1.1 200 OK swsclose
  27. Server: no
  28. Content-Length: 15
  29. Nice auth sir!
  30. </data1001>
  31. <datacheck>
  32. HTTP/1.1 407 Authorization Required to proxy me my dear swsclose
  33. Proxy-Authenticate: Digest realm="weirdorealm", nonce="12345"
  34. HTTP/1.1 401 Authorization to the remote host as well swsbounce swsclose
  35. WWW-Authenticate: Digest realm="realmweirdo", nonce="123456"
  36. HTTP/1.1 200 OK swsclose
  37. Server: no
  38. Content-Length: 15
  39. Nice auth sir!
  40. </datacheck>
  41. </reply>
  42. # Client-side
  43. <client>
  44. <server>
  45. http
  46. </server>
  47. <features>
  48. !SSPI
  49. crypto
  50. </features>
  51. <name>
  52. HTTP with proxy-requiring-Digest to site-requiring-Digest
  53. </name>
  54. <command>
  55. http://data.from.server.requiring.digest.hohoho.com/168 --proxy http://%HOSTIP:%HTTPPORT --proxy-user foo:bar --proxy-digest --digest --user digest:alot
  56. </command>
  57. </client>
  58. # Verify data after the test has been "shot"
  59. <verify>
  60. <strip>
  61. ^User-Agent: curl/.*
  62. </strip>
  63. <protocol>
  64. GET http://data.from.server.requiring.digest.hohoho.com/168 HTTP/1.1
  65. 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
  66. Host: data.from.server.requiring.digest.hohoho.com
  67. Accept: */*
  68. Proxy-Connection: Keep-Alive
  69. GET http://data.from.server.requiring.digest.hohoho.com/168 HTTP/1.1
  70. Proxy-Authorization: Digest username="foo", realm="weirdorealm", nonce="12345", uri="/168", response="fb8608e00ad9239a3dedb14bc8575976"
  71. 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
  72. Host: data.from.server.requiring.digest.hohoho.com
  73. Accept: */*
  74. Proxy-Connection: Keep-Alive
  75. GET http://data.from.server.requiring.digest.hohoho.com/168 HTTP/1.1
  76. Proxy-Authorization: Digest username="foo", realm="weirdorealm", nonce="12345", uri="/168", response="fb8608e00ad9239a3dedb14bc8575976"
  77. Authorization: Digest username="digest", realm="realmweirdo", nonce="123456", uri="/168", response="ca87f2d768a231e2d637a55698d5c416"
  78. User-Agent: curl/7.12.0-CVS (i686-pc-linux-gnu) libcurl/7.12.0-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.3
  79. Host: data.from.server.requiring.digest.hohoho.com
  80. Accept: */*
  81. Proxy-Connection: Keep-Alive
  82. </protocol>
  83. </verify>
  84. </testcase>