test565 1.9 KB

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