test273 1.8 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. WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"
  16. Content-Type: text/html; charset=iso-8859-1
  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. WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"
  33. Content-Type: text/html; charset=iso-8859-1
  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 two Digest authorization headers
  51. </name>
  52. <command>
  53. http://%HOSTIP:%HTTPPORT/273 -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 /273 HTTP/1.1
  63. Host: %HOSTIP:%HTTPPORT
  64. Accept: */*
  65. GET /273 HTTP/1.1
  66. Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/273", response="576ae57b1db0039f8c0de43ef58e49e3"
  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>