test2076 1.3 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. WWW-Authenticate: Digest realm="testrealm", nonce="1"
  14. Content-Length: 26
  15. This is not the real page
  16. </data>
  17. # This is supposed to be returned when the server gets a
  18. # Authorization: Digest line passed-in from the client
  19. <data1000>
  20. HTTP/1.1 200 OK swsclose
  21. Content-Length: 23
  22. This IS the real page!
  23. </data1000>
  24. <datacheck>
  25. HTTP/1.1 401 Authorization Required swsclose
  26. WWW-Authenticate: Digest realm="testrealm", nonce="1"
  27. Content-Length: 26
  28. HTTP/1.1 200 OK swsclose
  29. Content-Length: 23
  30. This IS the real page!
  31. </datacheck>
  32. </reply>
  33. # Client-side
  34. <client>
  35. <server>
  36. http
  37. </server>
  38. <features>
  39. !SSPI
  40. crypto
  41. </features>
  42. <name>
  43. HTTP with digest auth and URI contains query
  44. </name>
  45. <command>
  46. "http://%HOSTIP:%HTTPPORT/2076?query" -u testuser:testpass --digest
  47. </command>
  48. </client>
  49. # Verify data after the test has been "shot"
  50. <verify>
  51. <strip>
  52. ^User-Agent:.*
  53. </strip>
  54. <protocol>
  55. GET /2076?query HTTP/1.1
  56. Host: %HOSTIP:%HTTPPORT
  57. Accept: */*
  58. GET /2076?query HTTP/1.1
  59. Host: %HOSTIP:%HTTPPORT
  60. Authorization: Digest username="testuser", realm="testrealm", nonce="1", uri="/2076?query", response="5758bd3bbde7f33236e6ccd278eb59af"
  61. Accept: */*
  62. </protocol>
  63. </verify>
  64. </testcase>