test90 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  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. </features>
  110. <server>
  111. http
  112. </server>
  113. <name>
  114. HTTP with NTLM via --anyauth, and then follow-location with NTLM again
  115. </name>
  116. <setenv>
  117. # we force our own host name, in order to make the test machine independent
  118. CURL_GETHOSTNAME=curlhost
  119. # we try to use the LD_PRELOAD hack, if not a debug build
  120. LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  121. </setenv>
  122. <command>
  123. http://%HOSTIP:%HTTPPORT/90 -u testuser:testpass --anyauth -L
  124. </command>
  125. <precheck>
  126. chkhostname curlhost
  127. </precheck>
  128. </client>
  129. # Verify data after the test has been "shot"
  130. <verify>
  131. <strip>
  132. ^User-Agent:.*
  133. </strip>
  134. <protocol>
  135. GET /90 HTTP/1.1
  136. Host: %HOSTIP:%HTTPPORT
  137. Accept: */*
  138. GET /90 HTTP/1.1
  139. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  140. 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
  141. Host: %HOSTIP:%HTTPPORT
  142. Accept: */*
  143. GET /90 HTTP/1.1
  144. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
  145. 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
  146. Host: %HOSTIP:%HTTPPORT
  147. Accept: */*
  148. GET /you/900010 HTTP/1.1
  149. Host: %HOSTIP:%HTTPPORT
  150. Accept: */*
  151. GET /you/900010 HTTP/1.1
  152. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  153. 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
  154. Host: %HOSTIP:%HTTPPORT
  155. Accept: */*
  156. GET /you/900010 HTTP/1.1
  157. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
  158. 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
  159. Host: %HOSTIP:%HTTPPORT
  160. Accept: */*
  161. </protocol>
  162. </verify>
  163. </testcase>