test70 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. NTLM
  48. </features>
  49. <server>
  50. http
  51. </server>
  52. <name>
  53. HTTP with Digest *OR* NTLM authorization
  54. </name>
  55. <command>
  56. http://%HOSTIP:%HTTPPORT/70 -u testuser:testpass --anyauth
  57. </command>
  58. </client>
  59. # Verify data after the test has been "shot"
  60. <verify>
  61. <strip>
  62. ^User-Agent:.*
  63. </strip>
  64. <protocol>
  65. GET /70 HTTP/1.1
  66. 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
  67. Host: %HOSTIP:%HTTPPORT
  68. Accept: */*
  69. GET /70 HTTP/1.1
  70. Authorization: Digest username="testuser", realm="testrealm", nonce="1053604199", uri="/70", response="2c9a6f00af0d86497b177b90e90c688a"
  71. 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
  72. Host: %HOSTIP:%HTTPPORT
  73. Accept: */*
  74. </protocol>
  75. </verify>
  76. </testcase>