2
0

test245 1.6 KB

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