test72 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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/%TESTNUMBER -u testuser:testpass --anyauth
  57. </command>
  58. </client>
  59. # Verify data after the test has been "shot"
  60. <verify>
  61. <protocol>
  62. GET /%TESTNUMBER HTTP/1.1
  63. Host: %HOSTIP:%HTTPPORT
  64. User-Agent: curl/%VERSION
  65. Accept: */*
  66. GET /%TESTNUMBER HTTP/1.1
  67. Host: %HOSTIP:%HTTPPORT
  68. Authorization: Digest username="testuser", realm="testrealm", nonce="1053604199", uri="/%TESTNUMBER", response="9fcd1330377365a09bbcb33b2cbb25bd"
  69. User-Agent: curl/%VERSION
  70. Accept: */*
  71. </protocol>
  72. </verify>
  73. </testcase>