test246 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. !SSPI
  54. crypto
  55. </features>
  56. <name>
  57. HTTP POST --digest with server doing a 100 before 401 response
  58. </name>
  59. <command>
  60. http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u auser:apasswd --digest -d "junkelijunk"
  61. </command>
  62. </client>
  63. # Verify data after the test has been "shot"
  64. <verify>
  65. <protocol nonewline="yes">
  66. POST /%TESTNUMBER HTTP/1.1
  67. Host: %HOSTIP:%HTTPPORT
  68. User-Agent: curl/%VERSION
  69. Accept: */*
  70. Content-Length: 0
  71. Content-Type: application/x-www-form-urlencoded
  72. POST /%TESTNUMBER HTTP/1.1
  73. Host: %HOSTIP:%HTTPPORT
  74. Authorization: Digest username="auser", realm="testrealm", nonce="1053604144", uri="/%TESTNUMBER", response="761e6fc9a760c39d587092e8d840e740"
  75. User-Agent: curl/%VERSION
  76. Accept: */*
  77. Content-Length: 11
  78. Content-Type: application/x-www-form-urlencoded
  79. junkelijunk
  80. </protocol>
  81. </verify>
  82. </testcase>