test89 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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 TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  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/%TESTNUMBER0010
  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 TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  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 TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  55. HTTP/1.1 301 Things are fine in server land swsclose
  56. Server: Microsoft-IIS/5.0
  57. Connection: close
  58. Location: /you/%TESTNUMBER0010
  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 TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  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. SSL
  76. !SSPI
  77. debug
  78. </features>
  79. <server>
  80. http
  81. </server>
  82. <name>
  83. HTTP with NTLM and follow-location
  84. </name>
  85. <setenv>
  86. # we force our own host name, in order to make the test machine independent
  87. CURL_GETHOSTNAME=curlhost
  88. # we try to use the LD_PRELOAD hack, if not a debug build
  89. LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  90. </setenv>
  91. <command>
  92. http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --ntlm -L
  93. </command>
  94. <precheck>
  95. chkhostname curlhost
  96. </precheck>
  97. </client>
  98. # Verify data after the test has been "shot"
  99. <verify>
  100. <protocol>
  101. GET /%TESTNUMBER HTTP/1.1
  102. Host: %HOSTIP:%HTTPPORT
  103. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  104. User-Agent: curl/%VERSION
  105. Accept: */*
  106. GET /%TESTNUMBER HTTP/1.1
  107. Host: %HOSTIP:%HTTPPORT
  108. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
  109. User-Agent: curl/%VERSION
  110. Accept: */*
  111. GET /you/%TESTNUMBER0010 HTTP/1.1
  112. Host: %HOSTIP:%HTTPPORT
  113. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  114. User-Agent: curl/%VERSION
  115. Accept: */*
  116. GET /you/%TESTNUMBER0010 HTTP/1.1
  117. Host: %HOSTIP:%HTTPPORT
  118. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
  119. User-Agent: curl/%VERSION
  120. Accept: */*
  121. </protocol>
  122. </verify>
  123. </testcase>