test159 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. Connection: close
  21. This is not the real page either!
  22. </data1001>
  23. <datacheck>
  24. HTTP/1.1 401 Now gimme that second request of crap
  25. Server: Microsoft-IIS/5.0
  26. Content-Type: text/html; charset=iso-8859-1
  27. Content-Length: 34
  28. WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  29. Connection: close
  30. This is not the real page either!
  31. </datacheck>
  32. </reply>
  33. # Client-side
  34. <client>
  35. <features>
  36. NTLM
  37. !SSPI
  38. debug
  39. </features>
  40. <server>
  41. http
  42. </server>
  43. <name>
  44. HTTP with NTLM authorization when talking HTTP/1.0 (known to fail)
  45. </name>
  46. <setenv>
  47. # we force our own host name, in order to make the test machine independent
  48. CURL_GETHOSTNAME=curlhost
  49. # we try to use the LD_PRELOAD hack, if not a debug build
  50. LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  51. </setenv>
  52. <command>
  53. http://%HOSTIP:%HTTPPORT/159 -u testuser:testpass --ntlm -0
  54. </command>
  55. <precheck>
  56. chkhostname curlhost
  57. </precheck>
  58. </client>
  59. # Verify data after the test has been "shot"
  60. <verify>
  61. <strip>
  62. ^User-Agent:.*
  63. </strip>
  64. <protocol>
  65. GET /159 HTTP/1.0
  66. Host: %HOSTIP:%HTTPPORT
  67. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  68. 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
  69. Accept: */*
  70. </protocol>
  71. </verify>
  72. </testcase>