2
0

test67 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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 TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  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 TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  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. SSL
  49. !SSPI
  50. debug
  51. </features>
  52. <server>
  53. http
  54. </server>
  55. <name>
  56. HTTP with NTLM authorization
  57. </name>
  58. <setenv>
  59. # we force our own host name, in order to make the test machine independent
  60. CURL_GETHOSTNAME=curlhost
  61. # we try to use the LD_PRELOAD hack, if not a debug build
  62. LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  63. </setenv>
  64. <command>
  65. http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --ntlm
  66. </command>
  67. <precheck>
  68. chkhostname curlhost
  69. </precheck>
  70. </client>
  71. # Verify data after the test has been "shot"
  72. <verify>
  73. <protocol>
  74. GET /%TESTNUMBER HTTP/1.1
  75. Host: %HOSTIP:%HTTPPORT
  76. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  77. User-Agent: curl/%VERSION
  78. Accept: */*
  79. GET /%TESTNUMBER HTTP/1.1
  80. Host: %HOSTIP:%HTTPPORT
  81. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
  82. User-Agent: curl/%VERSION
  83. Accept: */*
  84. </protocol>
  85. </verify>
  86. </testcase>