test245 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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 401 authentication please swsbounce
  13. Server: Microsoft-IIS/6.0
  14. WWW-Authenticate: Digest realm="testrealm", nonce="1053604144"
  15. Content-Type: text/html; charset=iso-8859-1
  16. Content-Length: 0
  17. </data>
  18. <data1000>
  19. HTTP/1.1 200 A OK
  20. Server: Microsoft-IIS/6.0
  21. Content-Type: text/html; charset=iso-8859-1
  22. Content-Length: 3
  23. ok
  24. </data1000>
  25. <datacheck>
  26. HTTP/1.1 401 authentication please swsbounce
  27. Server: Microsoft-IIS/6.0
  28. WWW-Authenticate: Digest realm="testrealm", nonce="1053604144"
  29. Content-Type: text/html; charset=iso-8859-1
  30. Content-Length: 0
  31. HTTP/1.1 200 A OK
  32. Server: Microsoft-IIS/6.0
  33. Content-Type: text/html; charset=iso-8859-1
  34. Content-Length: 3
  35. ok
  36. </datacheck>
  37. </reply>
  38. # Client-side
  39. <client>
  40. #
  41. <server>
  42. http
  43. </server>
  44. <features>
  45. !SSPI
  46. crypto
  47. </features>
  48. <name>
  49. HTTP POST --digest
  50. </name>
  51. <command>
  52. http://%HOSTIP:%HTTPPORT/245 -u auser:apasswd --digest -d "junkelijunk"
  53. </command>
  54. </client>
  55. # Verify data after the test has been "shot"
  56. <verify>
  57. <strip>
  58. ^User-Agent:.*
  59. </strip>
  60. <protocol nonewline="yes">
  61. POST /245 HTTP/1.1
  62. Host: %HOSTIP:%HTTPPORT
  63. 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
  64. Accept: */*
  65. Content-Length: 0
  66. Content-Type: application/x-www-form-urlencoded
  67. POST /245 HTTP/1.1
  68. Host: %HOSTIP:%HTTPPORT
  69. Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/245", response="379a439b1737ba257c1d2f103914b18b"
  70. 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
  71. Accept: */*
  72. Content-Length: 11
  73. Content-Type: application/x-www-form-urlencoded
  74. junkelijunk
  75. </protocol>
  76. </verify>
  77. </testcase>