test64 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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/html; 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. <data1000>
  22. HTTP/1.1 200 OK swsclose
  23. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  24. Content-Type: text/html; charset=iso-8859-1
  25. Content-Length: 23
  26. This IS the real page!
  27. </data1000>
  28. <datacheck>
  29. HTTP/1.1 401 Authorization Required swsclose
  30. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  31. WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"
  32. Content-Type: text/html; charset=iso-8859-1
  33. Content-Length: 26
  34. HTTP/1.1 200 OK swsclose
  35. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  36. Content-Type: text/html; charset=iso-8859-1
  37. Content-Length: 23
  38. This IS the real page!
  39. </datacheck>
  40. </reply>
  41. # Client-side
  42. <client>
  43. <server>
  44. http
  45. </server>
  46. <features>
  47. crypto
  48. </features>
  49. <name>
  50. HTTP with Digest authorization
  51. </name>
  52. <command>
  53. http://%HOSTIP:%HTTPPORT/64 -u testuser:testpass --digest
  54. </command>
  55. </client>
  56. # Verify data after the test has been "shot"
  57. <verify>
  58. <strip>
  59. ^User-Agent:.*
  60. </strip>
  61. <protocol>
  62. GET /64 HTTP/1.1
  63. Host: %HOSTIP:%HTTPPORT
  64. Accept: */*
  65. GET /64 HTTP/1.1
  66. Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/64", response="c55f7f30d83d774a3d2dcacf725abaca"
  67. User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3
  68. Host: %HOSTIP:%HTTPPORT
  69. Accept: */*
  70. </protocol>
  71. </verify>
  72. </testcase>