test69 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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. </features>
  65. <server>
  66. http
  67. </server>
  68. <name>
  69. HTTP with NTLM, Basic or Wild-and-crazy authorization
  70. </name>
  71. <setenv>
  72. # we force our own host name, in order to make the test machine independent
  73. CURL_GETHOSTNAME=curlhost
  74. # we try to use the LD_PRELOAD hack, if not a debug build
  75. LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  76. </setenv>
  77. <command>
  78. http://%HOSTIP:%HTTPPORT/69 -u testuser:testpass --anyauth
  79. </command>
  80. <precheck>
  81. chkhostname curlhost
  82. </precheck>
  83. </client>
  84. # Verify data after the test has been "shot"
  85. <verify>
  86. <strip>
  87. ^User-Agent:.*
  88. </strip>
  89. <protocol>
  90. GET /69 HTTP/1.1
  91. 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
  92. Host: %HOSTIP:%HTTPPORT
  93. Accept: */*
  94. GET /69 HTTP/1.1
  95. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  96. 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
  97. Host: %HOSTIP:%HTTPPORT
  98. Accept: */*
  99. GET /69 HTTP/1.1
  100. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
  101. 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
  102. Host: %HOSTIP:%HTTPPORT
  103. Accept: */*
  104. </protocol>
  105. </verify>
  106. </testcase>