test168 2.5 KB

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