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