test89 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP NTLM auth
  7. followlocation
  8. </keywords>
  9. </info>
  10. # Server-side
  11. <reply>
  12. <!-- no <data> in this test since we have NTLM from the start
  13. This is supposed to be returned when the server gets a first
  14. Authorization: NTLM line passed-in from the client -->
  15. <data1001>
  16. HTTP/1.1 401 Now gimme that second request of crap
  17. Server: Microsoft-IIS/5.0
  18. Content-Type: text/html; charset=iso-8859-1
  19. Content-Length: 34
  20. WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  21. This is not the real page either!
  22. </data1001>
  23. # This is supposed to be returned when the server gets the second
  24. # Authorization: NTLM line passed-in from the client
  25. <data1002>
  26. HTTP/1.1 301 Things are fine in server land swsclose
  27. Server: Microsoft-IIS/5.0
  28. Connection: close
  29. Location: /you/890010
  30. </data1002>
  31. # This is the first reply after the redirection
  32. <data1011>
  33. HTTP/1.1 401 Now gimme that second round of crap
  34. Server: Microsoft-IIS/5.0
  35. Content-Type: text/html; charset=iso-8859-1
  36. Content-Length: 34
  37. WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  38. This is not the real page either!
  39. </data1011>
  40. # This is supposed to be returned when the server gets the second
  41. # Authorization: NTLM line passed-in from the client
  42. <data1012>
  43. HTTP/1.1 200 Things are fine in server land swsclose
  44. Server: Microsoft-IIS/5.0
  45. Content-Type: text/html; charset=iso-8859-1
  46. Content-Length: 32
  47. Finally, this is the real page!
  48. </data1012>
  49. <datacheck>
  50. HTTP/1.1 401 Now gimme that second request of crap
  51. Server: Microsoft-IIS/5.0
  52. Content-Type: text/html; charset=iso-8859-1
  53. Content-Length: 34
  54. WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  55. HTTP/1.1 301 Things are fine in server land swsclose
  56. Server: Microsoft-IIS/5.0
  57. Connection: close
  58. Location: /you/890010
  59. HTTP/1.1 401 Now gimme that second round of crap
  60. Server: Microsoft-IIS/5.0
  61. Content-Type: text/html; charset=iso-8859-1
  62. Content-Length: 34
  63. WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  64. HTTP/1.1 200 Things are fine in server land swsclose
  65. Server: Microsoft-IIS/5.0
  66. Content-Type: text/html; charset=iso-8859-1
  67. Content-Length: 32
  68. Finally, this is the real page!
  69. </datacheck>
  70. </reply>
  71. # Client-side
  72. <client>
  73. <features>
  74. NTLM
  75. !SSPI
  76. debug
  77. </features>
  78. <server>
  79. http
  80. </server>
  81. <name>
  82. HTTP with NTLM and follow-location
  83. </name>
  84. <setenv>
  85. # we force our own host name, in order to make the test machine independent
  86. CURL_GETHOSTNAME=curlhost
  87. # we try to use the LD_PRELOAD hack, if not a debug build
  88. LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  89. </setenv>
  90. <command>
  91. http://%HOSTIP:%HTTPPORT/89 -u testuser:testpass --ntlm -L
  92. </command>
  93. <precheck>
  94. chkhostname curlhost
  95. </precheck>
  96. </client>
  97. # Verify data after the test has been "shot"
  98. <verify>
  99. <strip>
  100. ^User-Agent:.*
  101. </strip>
  102. <protocol>
  103. GET /89 HTTP/1.1
  104. Host: %HOSTIP:%HTTPPORT
  105. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  106. 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
  107. Accept: */*
  108. GET /89 HTTP/1.1
  109. Host: %HOSTIP:%HTTPPORT
  110. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
  111. 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
  112. Accept: */*
  113. GET /you/890010 HTTP/1.1
  114. Host: %HOSTIP:%HTTPPORT
  115. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  116. 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
  117. Accept: */*
  118. GET /you/890010 HTTP/1.1
  119. Host: %HOSTIP:%HTTPPORT
  120. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAOv8cm3wOKJ5nhWWScOgdUI2MzIxNzMyMVgNcU0f3zxHeccvitN7zHkBAQAAAAAAAACAPtXesZ0BNjMyMTczMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
  121. 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
  122. Accept: */*
  123. </protocol>
  124. </verify>
  125. </testcase>