test2031 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP NTLM auth
  7. </keywords>
  8. </info>
  9. # Server-side
  10. <reply>
  11. <!-- First request has NTLM auth, wrong password -->
  12. <data100>
  13. HTTP/1.1 401 Need NTLM auth
  14. Server: Microsoft-IIS/5.0
  15. Content-Type: text/html; charset=iso-8859-1
  16. Content-Length: 27
  17. WWW-Authenticate: NTLM
  18. This is not the real page!
  19. </data100>
  20. <data1101>
  21. HTTP/1.1 401 NTLM intermediate
  22. Server: Microsoft-IIS/5.0
  23. Content-Type: text/html; charset=iso-8859-1
  24. Content-Length: 33
  25. WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
  26. This is still not the real page!
  27. </data1101>
  28. <data1102>
  29. HTTP/1.1 401 Sorry wrong password
  30. Server: Microsoft-IIS/5.0
  31. Content-Type: text/html; charset=iso-8859-1
  32. Content-Length: 29
  33. WWW-Authenticate: NTLM
  34. This is a bad password page!
  35. </data1102>
  36. <!-- Second request has NTLM auth, right password -->
  37. <data200>
  38. HTTP/1.1 401 Need NTLM auth (2)
  39. Server: Microsoft-IIS/5.0
  40. Content-Type: text/html; charset=iso-8859-1
  41. Content-Length: 27
  42. WWW-Authenticate: NTLM
  43. This is not the real page!
  44. </data200>
  45. <data1201>
  46. HTTP/1.1 401 NTLM intermediate (2)
  47. Server: Microsoft-IIS/5.0
  48. Content-Type: text/html; charset=iso-8859-1
  49. Content-Length: 33
  50. WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
  51. This is still not the real page!
  52. </data1201>
  53. <data1202>
  54. HTTP/1.1 200 Things are fine in server land
  55. Server: Microsoft-IIS/5.0
  56. Content-Type: text/html; charset=iso-8859-1
  57. Content-Length: 32
  58. Finally, this is the real page!
  59. </data1202>
  60. <!-- Third request has NTLM auth, wrong password -->
  61. <data300>
  62. HTTP/1.1 401 Need NTLM auth (3)
  63. Server: Microsoft-IIS/5.0
  64. Content-Type: text/html; charset=iso-8859-1
  65. Content-Length: 27
  66. WWW-Authenticate: NTLM
  67. This is not the real page!
  68. </data300>
  69. <data1301>
  70. HTTP/1.1 401 NTLM intermediate (3)
  71. Server: Microsoft-IIS/5.0
  72. Content-Type: text/html; charset=iso-8859-1
  73. Content-Length: 33
  74. WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
  75. This is still not the real page!
  76. </data1301>
  77. <data1302>
  78. HTTP/1.1 401 Sorry wrong password (2)
  79. Server: Microsoft-IIS/5.0
  80. Content-Type: text/html; charset=iso-8859-1
  81. Content-Length: 29
  82. WWW-Authenticate: NTLM
  83. This is a bad password page!
  84. </data1302>
  85. <!-- Fourth request has NTLM auth, wrong password -->
  86. <data400>
  87. HTTP/1.1 401 Need NTLM auth (4)
  88. Server: Microsoft-IIS/5.0
  89. Content-Type: text/html; charset=iso-8859-1
  90. Content-Length: 27
  91. WWW-Authenticate: NTLM
  92. This is not the real page!
  93. </data400>
  94. <data1401>
  95. HTTP/1.1 401 NTLM intermediate (4)
  96. Server: Microsoft-IIS/5.0
  97. Content-Type: text/html; charset=iso-8859-1
  98. Content-Length: 33
  99. WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
  100. This is still not the real page!
  101. </data1401>
  102. <data1402>
  103. HTTP/1.1 401 Sorry wrong password (3)
  104. Server: Microsoft-IIS/5.0
  105. Content-Type: text/html; charset=iso-8859-1
  106. Content-Length: 29
  107. WWW-Authenticate: NTLM
  108. This is a bad password page!
  109. </data1402>
  110. <!-- Fifth request has NTLM auth, right password -->
  111. <data500>
  112. HTTP/1.1 401 Need NTLM auth (5)
  113. Server: Microsoft-IIS/5.0
  114. Content-Type: text/html; charset=iso-8859-1
  115. Content-Length: 27
  116. WWW-Authenticate: NTLM
  117. This is not the real page!
  118. </data500>
  119. <data1501>
  120. HTTP/1.1 401 NTLM intermediate (5)
  121. Server: Microsoft-IIS/5.0
  122. Content-Type: text/html; charset=iso-8859-1
  123. Content-Length: 33
  124. WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
  125. This is still not the real page!
  126. </data1501>
  127. <data1502>
  128. HTTP/1.1 200 Things are fine in server land (2)
  129. Server: Microsoft-IIS/5.0
  130. Content-Type: text/html; charset=iso-8859-1
  131. Content-Length: 32
  132. Finally, this is the real page!
  133. </data1502>
  134. <datacheck>
  135. HTTP/1.1 401 NTLM intermediate
  136. Server: Microsoft-IIS/5.0
  137. Content-Type: text/html; charset=iso-8859-1
  138. Content-Length: 33
  139. WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
  140. HTTP/1.1 401 Sorry wrong password
  141. Server: Microsoft-IIS/5.0
  142. Content-Type: text/html; charset=iso-8859-1
  143. Content-Length: 29
  144. WWW-Authenticate: NTLM
  145. This is a bad password page!
  146. HTTP/1.1 401 NTLM intermediate (2)
  147. Server: Microsoft-IIS/5.0
  148. Content-Type: text/html; charset=iso-8859-1
  149. Content-Length: 33
  150. WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
  151. HTTP/1.1 200 Things are fine in server land
  152. Server: Microsoft-IIS/5.0
  153. Content-Type: text/html; charset=iso-8859-1
  154. Content-Length: 32
  155. Finally, this is the real page!
  156. HTTP/1.1 401 NTLM intermediate (3)
  157. Server: Microsoft-IIS/5.0
  158. Content-Type: text/html; charset=iso-8859-1
  159. Content-Length: 33
  160. WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
  161. HTTP/1.1 401 Sorry wrong password (2)
  162. Server: Microsoft-IIS/5.0
  163. Content-Type: text/html; charset=iso-8859-1
  164. Content-Length: 29
  165. WWW-Authenticate: NTLM
  166. This is a bad password page!
  167. HTTP/1.1 401 NTLM intermediate (4)
  168. Server: Microsoft-IIS/5.0
  169. Content-Type: text/html; charset=iso-8859-1
  170. Content-Length: 33
  171. WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
  172. HTTP/1.1 401 Sorry wrong password (3)
  173. Server: Microsoft-IIS/5.0
  174. Content-Type: text/html; charset=iso-8859-1
  175. Content-Length: 29
  176. WWW-Authenticate: NTLM
  177. This is a bad password page!
  178. HTTP/1.1 401 NTLM intermediate (5)
  179. Server: Microsoft-IIS/5.0
  180. Content-Type: text/html; charset=iso-8859-1
  181. Content-Length: 33
  182. WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
  183. HTTP/1.1 200 Things are fine in server land (2)
  184. Server: Microsoft-IIS/5.0
  185. Content-Type: text/html; charset=iso-8859-1
  186. Content-Length: 32
  187. Finally, this is the real page!
  188. </datacheck>
  189. </reply>
  190. # Client-side
  191. <client>
  192. <features>
  193. NTLM
  194. !SSPI
  195. </features>
  196. <server>
  197. http
  198. </server>
  199. <tool>
  200. libauthretry
  201. </tool>
  202. <name>
  203. HTTP authorization retry (NTLM)
  204. </name>
  205. <setenv>
  206. # we force our own host name, in order to make the test machine independent
  207. CURL_GETHOSTNAME=curlhost
  208. # we try to use the LD_PRELOAD hack, if not a debug build
  209. LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  210. </setenv>
  211. <command>
  212. http://%HOSTIP:%HTTPPORT/2031 ntlm ntlm
  213. </command>
  214. <precheck>
  215. chkhostname curlhost
  216. </precheck>
  217. </client>
  218. # Verify data after the test has been "shot"
  219. <verify>
  220. <strip>
  221. ^User-Agent:.*
  222. </strip>
  223. <protocol>
  224. GET /20310100 HTTP/1.1
  225. Host: %HOSTIP:%HTTPPORT
  226. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  227. Accept: */*
  228. GET /20310100 HTTP/1.1
  229. Host: %HOSTIP:%HTTPPORT
  230. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=
  231. Accept: */*
  232. GET /20310200 HTTP/1.1
  233. Host: %HOSTIP:%HTTPPORT
  234. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  235. Accept: */*
  236. GET /20310200 HTTP/1.1
  237. Host: %HOSTIP:%HTTPPORT
  238. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=
  239. Accept: */*
  240. GET /20310300 HTTP/1.1
  241. Host: %HOSTIP:%HTTPPORT
  242. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  243. Accept: */*
  244. GET /20310300 HTTP/1.1
  245. Host: %HOSTIP:%HTTPPORT
  246. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=
  247. Accept: */*
  248. GET /20310400 HTTP/1.1
  249. Host: %HOSTIP:%HTTPPORT
  250. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  251. Accept: */*
  252. GET /20310400 HTTP/1.1
  253. Host: %HOSTIP:%HTTPPORT
  254. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=
  255. Accept: */*
  256. GET /20310500 HTTP/1.1
  257. Host: %HOSTIP:%HTTPPORT
  258. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  259. Accept: */*
  260. GET /20310500 HTTP/1.1
  261. Host: %HOSTIP:%HTTPPORT
  262. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=
  263. Accept: */*
  264. </protocol>
  265. </verify>
  266. </testcase>