test72 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP Digest auth
  7. </keywords>
  8. </info>
  9. # Server-side
  10. <reply>
  11. <data>
  12. HTTP/1.1 401 Authorization Required
  13. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  14. WWW-Authenticate: Basic realm="foothis"
  15. WWW-Authenticate: Digest realm="testrealm", nonce="1053604199"
  16. Content-Type: text/html; charset=iso-8859-1
  17. Content-Length: 26
  18. This is not the real page
  19. </data>
  20. # This is supposed to be returned when the server gets a
  21. # Authorization: Digest line passed-in from the client
  22. <data1000>
  23. HTTP/1.1 200 OK
  24. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  25. Content-Type: text/html; charset=iso-8859-1
  26. Content-Length: 23
  27. This IS the real page!
  28. </data1000>
  29. <datacheck>
  30. HTTP/1.1 401 Authorization Required
  31. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  32. WWW-Authenticate: Basic realm="foothis"
  33. WWW-Authenticate: Digest realm="testrealm", nonce="1053604199"
  34. Content-Type: text/html; charset=iso-8859-1
  35. Content-Length: 26
  36. HTTP/1.1 200 OK
  37. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  38. Content-Type: text/html; charset=iso-8859-1
  39. Content-Length: 23
  40. This IS the real page!
  41. </datacheck>
  42. </reply>
  43. # Client-side
  44. <client>
  45. <server>
  46. http
  47. </server>
  48. <features>
  49. !SSPI
  50. crypto
  51. </features>
  52. <name>
  53. HTTP with Digest *OR* Basic authorization
  54. </name>
  55. <command>
  56. http://%HOSTIP:%HTTPPORT/72 -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 /72 HTTP/1.1
  66. Host: %HOSTIP:%HTTPPORT
  67. 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
  68. Accept: */*
  69. GET /72 HTTP/1.1
  70. Host: %HOSTIP:%HTTPPORT
  71. Authorization: Digest username="testuser", realm="testrealm", nonce="1053604199", uri="/72", response="9fcd1330377365a09bbcb33b2cbb25bd"
  72. 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
  73. Accept: */*
  74. </protocol>
  75. </verify>
  76. </testcase>