test565 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP POST
  6. HTTP Digest auth
  7. </keywords>
  8. </info>
  9. #
  10. # Server-side
  11. <reply>
  12. <data>
  13. HTTP/1.1 100 Continue
  14. Server: Microsoft-IIS/5.0
  15. Date: Sun, 03 Apr 2005 14:57:45 GMT
  16. X-Powered-By: ASP.NET
  17. HTTP/1.1 401 authentication please swsbounce
  18. Server: Microsoft-IIS/6.0
  19. WWW-Authenticate: Digest realm="testrealm", nonce="1053604144"
  20. Content-Type: text/html; charset=iso-8859-1
  21. Content-Length: 0
  22. </data>
  23. <data1>
  24. HTTP/1.1 200 A OK
  25. Server: Microsoft-IIS/6.0
  26. Content-Type: text/html; charset=iso-8859-1
  27. Content-Length: 3
  28. ok
  29. </data1>
  30. <datacheck>
  31. HTTP/1.1 100 Continue
  32. Server: Microsoft-IIS/5.0
  33. Date: Sun, 03 Apr 2005 14:57:45 GMT
  34. X-Powered-By: ASP.NET
  35. HTTP/1.1 401 authentication please swsbounce
  36. Server: Microsoft-IIS/6.0
  37. WWW-Authenticate: Digest realm="testrealm", nonce="1053604144"
  38. Content-Type: text/html; charset=iso-8859-1
  39. Content-Length: 0
  40. HTTP/1.1 200 A OK
  41. Server: Microsoft-IIS/6.0
  42. Content-Type: text/html; charset=iso-8859-1
  43. Content-Length: 3
  44. ok
  45. </datacheck>
  46. </reply>
  47. # Client-side
  48. <client>
  49. <server>
  50. http
  51. </server>
  52. # tool is what to use instead of 'curl'
  53. <tool>
  54. lib565
  55. </tool>
  56. <name>
  57. send HTTP POST using read callback, chunked transfer-encoding and Digest
  58. </name>
  59. <command>
  60. http://%HOSTIP:%HTTPPORT/565
  61. </command>
  62. </client>
  63. #
  64. # Verify data after the test has been "shot"
  65. <verify>
  66. <protocol>
  67. POST /565 HTTP/1.1
  68. Host: %HOSTIP:%HTTPPORT
  69. Accept: */*
  70. Transfer-Encoding: chunked
  71. Content-Type: application/x-www-form-urlencoded
  72. 0
  73. POST /565 HTTP/1.1
  74. Authorization: Digest username="foo", realm="testrealm", nonce="1053604144", uri="/565", response="877424f750af047634dbd94f9933217b"
  75. Host: %HOSTIP:%HTTPPORT
  76. Accept: */*
  77. Transfer-Encoding: chunked
  78. Content-Type: application/x-www-form-urlencoded
  79. Expect: 100-continue
  80. 3
  81. one
  82. 3
  83. two
  84. 5
  85. three
  86. 1d
  87. and a final longer crap: four
  88. 0
  89. </protocol>
  90. </verify>
  91. </testcase>