test1418 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP NTLM auth
  7. connection re-use
  8. </keywords>
  9. </info>
  10. # Server-side
  11. <reply>
  12. <servercmd>
  13. connection-monitor
  14. </servercmd>
  15. <data>
  16. HTTP/1.1 401 Authentication please!
  17. Content-Length: 20
  18. WWW-Authenticate: Digest realm="loonie", nonce="314156592"
  19. WWW-Authenticate: Basic
  20. Please auth with me
  21. </data>
  22. # This is supposed to be returned when the server gets the second
  23. # Authorization: NTLM line passed-in from the client
  24. <data1000>
  25. HTTP/1.1 200 Things are fine in server land
  26. Server: Microsoft-IIS/5.0
  27. Content-Length: 4
  28. moo
  29. </data1000>
  30. <data1003>
  31. HTTP/1.1 200 OK
  32. Server: Another one/1.0
  33. Content-Length: 4
  34. boo
  35. </data1003>
  36. # This is the first reply after the redirection
  37. <data1011>
  38. HTTP/1.1 200 OK
  39. Server: Microsoft-IIS/5.0
  40. Content-Type: text/html; charset=iso-8859-1
  41. Content-Length: 34
  42. This is not the real page either!
  43. </data1011>
  44. <datacheck>
  45. HTTP/1.1 401 Authentication please!
  46. Content-Length: 20
  47. WWW-Authenticate: Digest realm="loonie", nonce="314156592"
  48. WWW-Authenticate: Basic
  49. HTTP/1.1 200 Things are fine in server land
  50. Server: Microsoft-IIS/5.0
  51. Content-Length: 4
  52. moo
  53. </datacheck>
  54. </reply>
  55. # Client-side
  56. <client>
  57. <server>
  58. http
  59. </server>
  60. <features>
  61. !SSPI
  62. crypto
  63. </features>
  64. <name>
  65. HTTP with --anyauth and connection re-use
  66. </name>
  67. <command>
  68. http://%HOSTIP:%HTTPPORT/1418 -u testuser:testpass --anyauth http://%HOSTIP:%HTTPPORT/14180003
  69. </command>
  70. </client>
  71. # Verify data after the test has been "shot"
  72. <verify>
  73. <strip>
  74. ^User-Agent:.*
  75. </strip>
  76. <protocol>
  77. GET /1418 HTTP/1.1
  78. Host: %HOSTIP:%HTTPPORT
  79. Accept: */*
  80. GET /1418 HTTP/1.1
  81. Authorization: Digest username="testuser", realm="loonie", nonce="314156592", uri="/1418", response="986238b7e0077754944c966f56d9bc77"
  82. Host: %HOSTIP:%HTTPPORT
  83. Accept: */*
  84. GET /14180003 HTTP/1.1
  85. Authorization: Digest username="testuser", realm="loonie", nonce="314156592", uri="/14180003", response="1c6390a67bac3283a9b023402f3b3540"
  86. Host: %HOSTIP:%HTTPPORT
  87. Accept: */*
  88. [DISCONNECT]
  89. </protocol>
  90. </verify>
  91. </testcase>