test90 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP NTLM auth
  7. --anyauth
  8. followlocation
  9. </keywords>
  10. </info>
  11. # Server-side
  12. <reply>
  13. <data>
  14. HTTP/1.1 401 Authorization Required swsclose
  15. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  16. WWW-Authenticate: Basic
  17. WWW-Authenticate: Wild-and-crazy
  18. WWW-Authenticate: NTLM
  19. Content-Type: text/html; charset=iso-8859-1
  20. Content-Length: 26
  21. This is not the real page
  22. </data>
  23. # This is supposed to be returned when the server gets a first
  24. # Authorization: NTLM line passed-in from the client
  25. <data1001>
  26. HTTP/1.1 401 Now gimme that second request of crap
  27. Server: Microsoft-IIS/5.0
  28. Content-Type: text/html; charset=iso-8859-1
  29. Content-Length: 34
  30. WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  31. This is not the real page either!
  32. </data1001>
  33. # This is supposed to be returned when the server gets the second
  34. # Authorization: NTLM line passed-in from the client
  35. <data1002>
  36. HTTP/1.1 301 Things are fine in server land swsclose
  37. Server: Microsoft-IIS/5.0
  38. Connection: close
  39. Location: /you/900010
  40. </data1002>
  41. # This is the first reply after the redirection
  42. <data10>
  43. HTTP/1.1 401 Authorization Required swsclose
  44. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  45. WWW-Authenticate: Basic
  46. WWW-Authenticate: Wild-and-crazy
  47. WWW-Authenticate: NTLM
  48. Content-Type: text/html; charset=iso-8859-1
  49. Content-Length: 26
  50. This is not the real page
  51. </data10>
  52. <data1011>
  53. HTTP/1.1 401 Now gimme that second round of crap
  54. Server: Microsoft-IIS/5.0
  55. Content-Type: text/html; charset=iso-8859-1
  56. Content-Length: 34
  57. WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  58. This is not the real page either!
  59. </data1011>
  60. # This is supposed to be returned when the server gets the second
  61. # Authorization: NTLM line passed-in from the client
  62. <data1012>
  63. HTTP/1.1 200 Things are fine in server land swsclose
  64. Server: Microsoft-IIS/5.0
  65. Content-Type: text/html; charset=iso-8859-1
  66. Content-Length: 32
  67. Finally, this is the real page!
  68. </data1012>
  69. <datacheck>
  70. HTTP/1.1 401 Authorization Required swsclose
  71. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  72. WWW-Authenticate: Basic
  73. WWW-Authenticate: Wild-and-crazy
  74. WWW-Authenticate: NTLM
  75. Content-Type: text/html; charset=iso-8859-1
  76. Content-Length: 26
  77. HTTP/1.1 401 Now gimme that second request of crap
  78. Server: Microsoft-IIS/5.0
  79. Content-Type: text/html; charset=iso-8859-1
  80. Content-Length: 34
  81. WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  82. HTTP/1.1 301 Things are fine in server land swsclose
  83. Server: Microsoft-IIS/5.0
  84. Connection: close
  85. Location: /you/900010
  86. HTTP/1.1 401 Authorization Required swsclose
  87. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  88. WWW-Authenticate: Basic
  89. WWW-Authenticate: Wild-and-crazy
  90. WWW-Authenticate: NTLM
  91. Content-Type: text/html; charset=iso-8859-1
  92. Content-Length: 26
  93. HTTP/1.1 401 Now gimme that second round of crap
  94. Server: Microsoft-IIS/5.0
  95. Content-Type: text/html; charset=iso-8859-1
  96. Content-Length: 34
  97. WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  98. HTTP/1.1 200 Things are fine in server land swsclose
  99. Server: Microsoft-IIS/5.0
  100. Content-Type: text/html; charset=iso-8859-1
  101. Content-Length: 32
  102. Finally, this is the real page!
  103. </datacheck>
  104. </reply>
  105. # Client-side
  106. <client>
  107. <features>
  108. NTLM
  109. !SSPI
  110. debug
  111. </features>
  112. <server>
  113. http
  114. </server>
  115. <name>
  116. HTTP with NTLM via --anyauth, and then follow-location with NTLM again
  117. </name>
  118. <setenv>
  119. # we force our own host name, in order to make the test machine independent
  120. CURL_GETHOSTNAME=curlhost
  121. # we try to use the LD_PRELOAD hack, if not a debug build
  122. LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  123. </setenv>
  124. <command>
  125. http://%HOSTIP:%HTTPPORT/90 -u testuser:testpass --anyauth -L
  126. </command>
  127. <precheck>
  128. chkhostname curlhost
  129. </precheck>
  130. </client>
  131. # Verify data after the test has been "shot"
  132. <verify>
  133. <strip>
  134. ^User-Agent:.*
  135. </strip>
  136. <protocol>
  137. GET /90 HTTP/1.1
  138. Host: %HOSTIP:%HTTPPORT
  139. Accept: */*
  140. GET /90 HTTP/1.1
  141. Host: %HOSTIP:%HTTPPORT
  142. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  143. User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
  144. Accept: */*
  145. GET /90 HTTP/1.1
  146. Host: %HOSTIP:%HTTPPORT
  147. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
  148. User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
  149. Accept: */*
  150. GET /you/900010 HTTP/1.1
  151. Host: %HOSTIP:%HTTPPORT
  152. Accept: */*
  153. GET /you/900010 HTTP/1.1
  154. Host: %HOSTIP:%HTTPPORT
  155. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  156. User-Agent: curl/7.10.8-pre1 (i686-pc-linux-gnu) libcurl/7.10.8-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3 GSS
  157. Accept: */*
  158. GET /you/900010 HTTP/1.1
  159. Host: %HOSTIP:%HTTPPORT
  160. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAOv8cm3wOKJ5nhWWScOgdUI2MzIxNzMyMVgNcU0f3zxHeccvitN7zHkBAQAAAAAAAACAPtXesZ0BNjMyMTczMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
  161. User-Agent: curl/7.10.8-pre1 (i686-pc-linux-gnu) libcurl/7.10.8-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3 GSS
  162. Accept: */*
  163. </protocol>
  164. </verify>
  165. </testcase>