test2076 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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/%TESTNUMBER?query" -u testuser:testpass --digest
  47. </command>
  48. </client>
  49. # Verify data after the test has been "shot"
  50. <verify>
  51. <protocol>
  52. GET /%TESTNUMBER?query HTTP/1.1
  53. Host: %HOSTIP:%HTTPPORT
  54. User-Agent: curl/%VERSION
  55. Accept: */*
  56. GET /%TESTNUMBER?query HTTP/1.1
  57. Host: %HOSTIP:%HTTPPORT
  58. Authorization: Digest username="testuser", realm="testrealm", nonce="1", uri="/%TESTNUMBER?query", response="5758bd3bbde7f33236e6ccd278eb59af"
  59. User-Agent: curl/%VERSION
  60. Accept: */*
  61. </protocol>
  62. </verify>
  63. </testcase>