test88 1.9 KB

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