2
0

test246 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP POST
  6. HTTP Digest auth
  7. </keywords>
  8. </info>
  9. # Server-side
  10. <reply>
  11. <data>
  12. HTTP/1.1 100 Continue
  13. Server: Microsoft-IIS/5.0
  14. Date: Sun, 03 Apr 2005 14:57:45 GMT
  15. X-Powered-By: ASP.NET
  16. HTTP/1.1 401 authentication please swsbounce
  17. Server: Microsoft-IIS/6.0
  18. WWW-Authenticate: Digest realm="testrealm", nonce="1053604144"
  19. Content-Type: text/html; charset=iso-8859-1
  20. Content-Length: 0
  21. </data>
  22. <data1000>
  23. HTTP/1.1 200 A OK
  24. Server: Microsoft-IIS/6.0
  25. Content-Type: text/html; charset=iso-8859-1
  26. Content-Length: 3
  27. ok
  28. </data1000>
  29. <datacheck>
  30. HTTP/1.1 100 Continue
  31. Server: Microsoft-IIS/5.0
  32. Date: Sun, 03 Apr 2005 14:57:45 GMT
  33. X-Powered-By: ASP.NET
  34. HTTP/1.1 401 authentication please swsbounce
  35. Server: Microsoft-IIS/6.0
  36. WWW-Authenticate: Digest realm="testrealm", nonce="1053604144"
  37. Content-Type: text/html; charset=iso-8859-1
  38. Content-Length: 0
  39. HTTP/1.1 200 A OK
  40. Server: Microsoft-IIS/6.0
  41. Content-Type: text/html; charset=iso-8859-1
  42. Content-Length: 3
  43. ok
  44. </datacheck>
  45. </reply>
  46. # Client-side
  47. <client>
  48. #
  49. <server>
  50. http
  51. </server>
  52. <features>
  53. crypto
  54. </features>
  55. <name>
  56. HTTP POST --digest with server doing a 100 before 401 response
  57. </name>
  58. <command>
  59. http://%HOSTIP:%HTTPPORT/246 -u auser:apasswd --digest -d "junkelijunk"
  60. </command>
  61. </client>
  62. # Verify data after the test has been "shot"
  63. <verify>
  64. <strip>
  65. ^User-Agent:.*
  66. </strip>
  67. <protocol nonewline="yes">
  68. POST /246 HTTP/1.1
  69. User-Agent: curl/7.12.1-CVS (i686-pc-linux-gnu) libcurl/7.12.1-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.6
  70. Host: %HOSTIP:%HTTPPORT
  71. Accept: */*
  72. Content-Length: 0
  73. Content-Type: application/x-www-form-urlencoded
  74. POST /246 HTTP/1.1
  75. Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/246", response="761e6fc9a760c39d587092e8d840e740"
  76. User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
  77. Host: %HOSTIP:%HTTPPORT
  78. Accept: */*
  79. Content-Length: 11
  80. Content-Type: application/x-www-form-urlencoded
  81. junkelijunk
  82. </protocol>
  83. </verify>
  84. </testcase>