test335 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <testcase>
  2. # Mostly a duplicate of test168
  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. proxy
  53. </features>
  54. <name>
  55. HTTP with proxy Digest and site Digest with creds in URLs
  56. </name>
  57. <command>
  58. http://digest:alot@data.from.server.requiring.digest.hohoho.com/%TESTNUMBER --proxy http://foo:bar@%HOSTIP:%HTTPPORT --proxy-digest --digest
  59. </command>
  60. </client>
  61. # Verify data after the test has been "shot"
  62. <verify>
  63. <protocol>
  64. GET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1
  65. Host: data.from.server.requiring.digest.hohoho.com
  66. User-Agent: curl/%VERSION
  67. Accept: */*
  68. Proxy-Connection: Keep-Alive
  69. GET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1
  70. Host: data.from.server.requiring.digest.hohoho.com
  71. Proxy-Authorization: Digest username="foo", realm="weirdorealm", nonce="12345", uri="/%TESTNUMBER", response="f61609cd8f5bb205ef4e169b2c5626cb"
  72. User-Agent: curl/%VERSION
  73. Accept: */*
  74. Proxy-Connection: Keep-Alive
  75. GET http://data.from.server.requiring.digest.hohoho.com/%TESTNUMBER HTTP/1.1
  76. Host: data.from.server.requiring.digest.hohoho.com
  77. Proxy-Authorization: Digest username="foo", realm="weirdorealm", nonce="12345", uri="/%TESTNUMBER", response="f61609cd8f5bb205ef4e169b2c5626cb"
  78. Authorization: Digest username="digest", realm="realmweirdo", nonce="123456", uri="/%TESTNUMBER", response="08a2e2e684047f4219a38ddc189ac00c"
  79. User-Agent: curl/%VERSION
  80. Accept: */*
  81. Proxy-Connection: Keep-Alive
  82. </protocol>
  83. </verify>
  84. </testcase>