test70 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. # Server-side
  2. <reply>
  3. <data>
  4. HTTP/1.1 401 Authorization Required
  5. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  6. WWW-Authenticate: Digest realm="testrealm", nonce="1053604199"
  7. WWW-Authenticate: NTLM
  8. Content-Type: text/html; charset=iso-8859-1
  9. Content-Length: 26
  10. This is not the real page
  11. </data>
  12. # This is supposed to be returned when the server gets a
  13. # Authorization: Digest line passed-in from the client
  14. <data1000>
  15. HTTP/1.1 200 OK
  16. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  17. Content-Type: text/html; charset=iso-8859-1
  18. Content-Length: 23
  19. This IS the real page!
  20. </data1000>
  21. <datacheck>
  22. HTTP/1.1 401 Authorization Required
  23. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  24. WWW-Authenticate: Digest realm="testrealm", nonce="1053604199"
  25. WWW-Authenticate: NTLM
  26. Content-Type: text/html; charset=iso-8859-1
  27. Content-Length: 26
  28. HTTP/1.1 200 OK
  29. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  30. Content-Type: text/html; charset=iso-8859-1
  31. Content-Length: 23
  32. This IS the real page!
  33. </datacheck>
  34. </reply>
  35. # Client-side
  36. <client>
  37. # NTLM only works if SSL-support is present
  38. <features>
  39. SSL
  40. </features>
  41. <server>
  42. http
  43. </server>
  44. <name>
  45. HTTP with Digest *OR* NTLM authorization
  46. </name>
  47. <command>
  48. http://%HOSTIP:%HOSTPORT/70 -u testuser:testpass --anyauth
  49. </command>
  50. </test>
  51. # Verify data after the test has been "shot"
  52. <verify>
  53. <strip>
  54. ^User-Agent:.*
  55. </strip>
  56. <protocol>
  57. GET /70 HTTP/1.1
  58. 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
  59. Host: 127.0.0.1:8999
  60. Pragma: no-cache
  61. Accept: */*
  62. GET /70 HTTP/1.1
  63. Authorization: Digest username="testuser", realm="testrealm", nonce="1053604199", uri="/70", response="2c9a6f00af0d86497b177b90e90c688a"
  64. 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
  65. Host: 127.0.0.1:8999
  66. Pragma: no-cache
  67. Accept: */*
  68. </protocol>
  69. </verify>