test88 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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/%TESTNUMBER -T log/put%TESTNUMBER -u testuser:testpass --digest
  58. </command>
  59. <file name="log/put%TESTNUMBER">
  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. <protocol>
  69. PUT /%TESTNUMBER HTTP/1.1
  70. Host: %HOSTIP:%HTTPPORT
  71. User-Agent: curl/%VERSION
  72. Accept: */*
  73. Content-Length: 0
  74. PUT /%TESTNUMBER HTTP/1.1
  75. Host: %HOSTIP:%HTTPPORT
  76. Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/%TESTNUMBER", response="78a49fa53d0c228778297687d4168e71"
  77. User-Agent: curl/%VERSION
  78. Accept: */*
  79. Content-Length: 85
  80. Expect: 100-continue
  81. This is data we upload with PUT
  82. a second line
  83. line three
  84. four is the number of lines
  85. </protocol>
  86. </verify>
  87. </testcase>