test1568 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <testcase>
  2. # based on test 64
  3. <info>
  4. <keywords>
  5. HTTP
  6. HTTP GET
  7. HTTP Digest auth
  8. </keywords>
  9. </info>
  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. !SSPI
  48. crypto
  49. </features>
  50. <name>
  51. HTTP with Digest authorization on custom CURLOPT_PORT
  52. </name>
  53. <tool>
  54. lib%TESTNUMBER
  55. </tool>
  56. <command>
  57. http://%HOSTIP/%TESTNUMBER %HTTPPORT
  58. </command>
  59. </client>
  60. # Verify data after the test has been "shot"
  61. <verify>
  62. <protocol>
  63. GET /%TESTNUMBER HTTP/1.1
  64. Host: %HOSTIP:%HTTPPORT
  65. User-Agent: lib%TESTNUMBER
  66. Accept: */*
  67. GET /%TESTNUMBER HTTP/1.1
  68. Host: %HOSTIP:%HTTPPORT
  69. Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/%TESTNUMBER", response="9cbbd857a37e45f2bcad5c7d088191df"
  70. User-Agent: lib%TESTNUMBER
  71. Accept: */*
  72. </protocol>
  73. </verify>
  74. </testcase>