test64 1.6 KB

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