test1079 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. crypto
  39. </features>
  40. <name>
  41. HTTP retry after closed connection and empty response
  42. </name>
  43. <command>
  44. http://%HOSTIP:%HTTPPORT/1079 -u testuser:testpass --digest
  45. </command>
  46. </client>
  47. # Verify data after the test has been "shot"
  48. <verify>
  49. <errorcode>
  50. 52
  51. </errorcode>
  52. <strip>
  53. ^User-Agent:.*
  54. </strip>
  55. <protocol>
  56. GET /1079 HTTP/1.1
  57. Host: %HOSTIP:%HTTPPORT
  58. Accept: */*
  59. GET /1079 HTTP/1.1
  60. Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/1079", response="e340c7cdca0950462070f46ee139e9f7"
  61. Host: %HOSTIP:%HTTPPORT
  62. Accept: */*
  63. </protocol>
  64. </verify>
  65. </testcase>