test245 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. crypto
  46. </features>
  47. <name>
  48. HTTP POST --digest
  49. </name>
  50. <command>
  51. http://%HOSTIP:%HTTPPORT/245 -u auser:apasswd --digest -d "junkelijunk"
  52. </command>
  53. </client>
  54. # Verify data after the test has been "shot"
  55. <verify>
  56. <strip>
  57. ^User-Agent:.*
  58. </strip>
  59. <protocol nonewline="yes">
  60. POST /245 HTTP/1.1
  61. 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
  62. Host: %HOSTIP:%HTTPPORT
  63. Accept: */*
  64. Content-Length: 0
  65. Content-Type: application/x-www-form-urlencoded
  66. POST /245 HTTP/1.1
  67. Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/245", response="379a439b1737ba257c1d2f103914b18b"
  68. 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
  69. Host: %HOSTIP:%HTTPPORT
  70. Accept: */*
  71. Content-Length: 11
  72. Content-Type: application/x-www-form-urlencoded
  73. junkelijunk
  74. </protocol>
  75. </verify>
  76. </testcase>