test65 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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="2053604145"
  7. Content-Type: text/html; charset=iso-8859-1
  8. Content-Length: 26
  9. This is not the real page
  10. </data>
  11. # This is supposed to be returned when the server gets a
  12. # Authorization: Digest line passed-in from the client
  13. <data1000>
  14. HTTP/1.1 401 Still a bad password you moron
  15. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  16. Content-Type: text/html; charset=iso-8859-1
  17. Content-Length: 34
  18. This is not the real page either
  19. </data1000>
  20. <datacheck>
  21. HTTP/1.1 401 Authorization Required
  22. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  23. WWW-Authenticate: Digest realm="testrealm", nonce="2053604145"
  24. Content-Type: text/html; charset=iso-8859-1
  25. Content-Length: 26
  26. HTTP/1.1 401 Still a bad password you moron
  27. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  28. Content-Type: text/html; charset=iso-8859-1
  29. Content-Length: 34
  30. This is not the real page either
  31. </datacheck>
  32. </reply>
  33. # Client-side
  34. <client>
  35. <server>
  36. http
  37. </server>
  38. <name>
  39. HTTP with Digest authorization with bad password
  40. </name>
  41. <command>
  42. http://%HOSTIP:%HOSTPORT/65 -u testuser:test2pass --digest
  43. </command>
  44. </test>
  45. # Verify data after the test has been "shot"
  46. <verify>
  47. <strip>
  48. ^User-Agent:.*
  49. </strip>
  50. <protocol>
  51. GET /65 HTTP/1.1
  52. Host: 127.0.0.1:8999
  53. Pragma: no-cache
  54. Accept: */*
  55. GET /65 HTTP/1.1
  56. Authorization: Digest username="testuser", realm="testrealm", nonce="2053604145", uri="/65", response="66d68d3251f1839576ba7c766cf9205b"
  57. User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3
  58. Host: 127.0.0.1:8999
  59. Pragma: no-cache
  60. Accept: */*
  61. </protocol>
  62. </verify>