test159 2.7 KB

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