test70 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP Digest auth
  7. --anyauth
  8. </keywords>
  9. </info>
  10. # Server-side
  11. <reply>
  12. <data>
  13. HTTP/1.1 401 Authorization Required
  14. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  15. WWW-Authenticate: Digest realm="testrealm", nonce="1053604199"
  16. WWW-Authenticate: NTLM
  17. Content-Type: text/html; charset=iso-8859-1
  18. Content-Length: 26
  19. This is not the real page
  20. </data>
  21. # This is supposed to be returned when the server gets a
  22. # Authorization: Digest line passed-in from the client
  23. <data1000>
  24. HTTP/1.1 200 OK
  25. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  26. Content-Type: text/html; charset=iso-8859-1
  27. Content-Length: 23
  28. This IS the real page!
  29. </data1000>
  30. <datacheck>
  31. HTTP/1.1 401 Authorization Required
  32. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  33. WWW-Authenticate: Digest realm="testrealm", nonce="1053604199"
  34. WWW-Authenticate: NTLM
  35. Content-Type: text/html; charset=iso-8859-1
  36. Content-Length: 26
  37. HTTP/1.1 200 OK
  38. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  39. Content-Type: text/html; charset=iso-8859-1
  40. Content-Length: 23
  41. This IS the real page!
  42. </datacheck>
  43. </reply>
  44. # Client-side
  45. <client>
  46. <features>
  47. !SSPI
  48. NTLM
  49. </features>
  50. <server>
  51. http
  52. </server>
  53. <name>
  54. HTTP with Digest *OR* NTLM authorization
  55. </name>
  56. <command>
  57. http://%HOSTIP:%HTTPPORT/70 -u testuser:testpass --anyauth
  58. </command>
  59. </client>
  60. # Verify data after the test has been "shot"
  61. <verify>
  62. <strip>
  63. ^User-Agent:.*
  64. </strip>
  65. <protocol>
  66. GET /70 HTTP/1.1
  67. Host: %HOSTIP:%HTTPPORT
  68. User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
  69. Accept: */*
  70. GET /70 HTTP/1.1
  71. Host: %HOSTIP:%HTTPPORT
  72. Authorization: Digest username="testuser", realm="testrealm", nonce="1053604199", uri="/70", response="2c9a6f00af0d86497b177b90e90c688a"
  73. User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
  74. Accept: */*
  75. </protocol>
  76. </verify>
  77. </testcase>