test150 3.0 KB

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