test335 2.8 KB

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