test1079 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP Digest auth
  7. </keywords>
  8. </info>
  9. # Server-side
  10. <reply>
  11. <data>
  12. HTTP/1.1 401 Authorization Required swsclose
  13. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  14. WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"
  15. Content-Type: text/plain; charset=iso-8859-1
  16. Content-Length: 26
  17. This is not the real page
  18. </data>
  19. # This is supposed to be returned when the server gets a
  20. # Authorization: Digest line passed-in from the client
  21. # Send nothing to force an error code 52 reply
  22. <data1000>
  23. </data1000>
  24. <datacheck>
  25. HTTP/1.1 401 Authorization Required swsclose
  26. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  27. WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"
  28. Content-Type: text/plain; charset=iso-8859-1
  29. Content-Length: 26
  30. </datacheck>
  31. </reply>
  32. # Client-side
  33. <client>
  34. <server>
  35. http
  36. </server>
  37. <features>
  38. !SSPI
  39. crypto
  40. </features>
  41. <name>
  42. HTTP retry after closed connection and empty response
  43. </name>
  44. <command>
  45. http://%HOSTIP:%HTTPPORT/1079 -u testuser:testpass --digest
  46. </command>
  47. </client>
  48. # Verify data after the test has been "shot"
  49. <verify>
  50. <errorcode>
  51. 52
  52. </errorcode>
  53. <strip>
  54. ^User-Agent:.*
  55. </strip>
  56. <protocol>
  57. GET /1079 HTTP/1.1
  58. Host: %HOSTIP:%HTTPPORT
  59. Accept: */*
  60. GET /1079 HTTP/1.1
  61. Host: %HOSTIP:%HTTPPORT
  62. Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/1079", response="e340c7cdca0950462070f46ee139e9f7"
  63. Accept: */*
  64. </protocol>
  65. </verify>
  66. </testcase>