test69 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP NTLM auth
  7. </keywords>
  8. </info>
  9. # Server-side
  10. <reply>
  11. <data>
  12. HTTP/1.1 401 Authorization Required swsclose
  13. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  14. WWW-Authenticate: Basic
  15. WWW-Authenticate: Wild-and-crazy
  16. WWW-Authenticate: NTLM
  17. Content-Type: text/html; charset=iso-8859-1
  18. Content-Length: 26
  19. This is not the real page
  20. </data>
  21. # This is supposed to be returned when the server gets a first
  22. # Authorization: NTLM line passed-in from the client
  23. <data1001>
  24. HTTP/1.1 401 Now gimme that second request of crap
  25. Server: Microsoft-IIS/5.0
  26. Content-Length: 34
  27. Content-Type: text/html; charset=iso-8859-1
  28. WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  29. This is not the real page either!
  30. </data1001>
  31. # This is supposed to be returned when the server gets the second
  32. # Authorization: NTLM line passed-in from the client
  33. <data1002>
  34. HTTP/1.1 200 Things are fine in server land swsclose
  35. Server: Microsoft-IIS/5.0
  36. Content-Type: text/html; charset=iso-8859-1
  37. Content-Length: 32
  38. Finally, this is the real page!
  39. </data1002>
  40. <datacheck>
  41. HTTP/1.1 401 Authorization Required swsclose
  42. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  43. WWW-Authenticate: Basic
  44. WWW-Authenticate: Wild-and-crazy
  45. WWW-Authenticate: NTLM
  46. Content-Type: text/html; charset=iso-8859-1
  47. Content-Length: 26
  48. HTTP/1.1 401 Now gimme that second request of crap
  49. Server: Microsoft-IIS/5.0
  50. Content-Length: 34
  51. Content-Type: text/html; charset=iso-8859-1
  52. WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  53. HTTP/1.1 200 Things are fine in server land swsclose
  54. Server: Microsoft-IIS/5.0
  55. Content-Type: text/html; charset=iso-8859-1
  56. Content-Length: 32
  57. Finally, this is the real page!
  58. </datacheck>
  59. </reply>
  60. # Client-side
  61. <client>
  62. <features>
  63. NTLM
  64. !SSPI
  65. debug
  66. </features>
  67. <server>
  68. http
  69. </server>
  70. <name>
  71. HTTP with NTLM, Basic or Wild-and-crazy authorization
  72. </name>
  73. <setenv>
  74. # we force our own host name, in order to make the test machine independent
  75. CURL_GETHOSTNAME=curlhost
  76. # we try to use the LD_PRELOAD hack, if not a debug build
  77. LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  78. </setenv>
  79. <command>
  80. http://%HOSTIP:%HTTPPORT/69 -u testuser:testpass --anyauth
  81. </command>
  82. <precheck>
  83. chkhostname curlhost
  84. </precheck>
  85. </client>
  86. # Verify data after the test has been "shot"
  87. <verify>
  88. <strip>
  89. ^User-Agent:.*
  90. </strip>
  91. <protocol>
  92. GET /69 HTTP/1.1
  93. 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
  94. Host: %HOSTIP:%HTTPPORT
  95. Accept: */*
  96. GET /69 HTTP/1.1
  97. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  98. 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
  99. Host: %HOSTIP:%HTTPPORT
  100. Accept: */*
  101. GET /69 HTTP/1.1
  102. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
  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. </protocol>
  107. </verify>
  108. </testcase>