test1229 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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 with user name needing escape
  51. </name>
  52. <command>
  53. http://%5cuser%22:password@%HOSTIP:%HTTPPORT/1229 --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 /1229 HTTP/1.1
  63. Host: %HOSTIP:%HTTPPORT
  64. Accept: */*
  65. GET /1229 HTTP/1.1
  66. Authorization: Digest username="\\user\"", realm="testrealm", nonce="1053604145", uri="/1229", response="f2694d426040712584c156d3de72b8d6"
  67. Host: %HOSTIP:%HTTPPORT
  68. Accept: */*
  69. </protocol>
  70. </verify>
  71. </testcase>