test72 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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: Basic realm="foothis"
  7. WWW-Authenticate: Digest realm="testrealm", nonce="1053604199"
  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: Basic realm="foothis"
  25. WWW-Authenticate: Digest realm="testrealm", nonce="1053604199"
  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. <server>
  38. http
  39. </server>
  40. <name>
  41. HTTP with Digest *OR* Basic authorization
  42. </name>
  43. <command>
  44. http://%HOSTIP:%HOSTPORT/72 -u testuser:testpass --anyauth
  45. </command>
  46. </test>
  47. # Verify data after the test has been "shot"
  48. <verify>
  49. <strip>
  50. ^User-Agent:.*
  51. </strip>
  52. <protocol>
  53. GET /72 HTTP/1.1
  54. 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
  55. Host: 127.0.0.1:8999
  56. Pragma: no-cache
  57. Accept: */*
  58. GET /72 HTTP/1.1
  59. Authorization: Digest username="testuser", realm="testrealm", nonce="1053604199", uri="/72", response="9fcd1330377365a09bbcb33b2cbb25bd"
  60. 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
  61. Host: 127.0.0.1:8999
  62. Pragma: no-cache
  63. Accept: */*
  64. </protocol>
  65. </verify>