test88 2.0 KB

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