test2032 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP Basic auth
  7. HTTP NTLM auth
  8. flaky
  9. </keywords>
  10. </info>
  11. # Server-side
  12. <reply>
  13. <!-- Basic auth -->
  14. <data100>
  15. HTTP/1.1 401 Need Basic or NTLM auth
  16. Server: Microsoft-IIS/5.0
  17. Content-Type: text/html; charset=iso-8859-1
  18. Content-Length: 29
  19. WWW-Authenticate: NTLM
  20. WWW-Authenticate: Basic realm="testrealm"
  21. This is a bad password page!
  22. </data100>
  23. <!-- NTLM auth -->
  24. <data200>
  25. HTTP/1.1 401 Need Basic or NTLM auth (2)
  26. Server: Microsoft-IIS/5.0
  27. Content-Type: text/html; charset=iso-8859-1
  28. Content-Length: 27
  29. WWW-Authenticate: NTLM
  30. WWW-Authenticate: Basic realm="testrealm"
  31. This is not the real page!
  32. </data200>
  33. <data1201>
  34. HTTP/1.1 401 NTLM intermediate (2)
  35. Server: Microsoft-IIS/5.0
  36. Content-Type: text/html; charset=iso-8859-1
  37. Content-Length: 33
  38. WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
  39. This is still not the real page!
  40. </data1201>
  41. <data1202>
  42. HTTP/1.1 200 Things are fine in server land
  43. Server: Microsoft-IIS/5.0
  44. Content-Type: text/html; charset=iso-8859-1
  45. Content-Length: 32
  46. Finally, this is the real page!
  47. </data1202>
  48. <datacheck>
  49. Data connection 0: 228
  50. Data connection 1: 228
  51. Data connection 2: 402
  52. </datacheck>
  53. </reply>
  54. # Client-side
  55. <client>
  56. <features>
  57. NTLM
  58. !SSPI
  59. </features>
  60. <server>
  61. http
  62. </server>
  63. <tool>
  64. libntlmconnect
  65. </tool>
  66. <name>
  67. NTLM connection mapping
  68. </name>
  69. <setenv>
  70. # we force our own host name, in order to make the test machine independent
  71. CURL_GETHOSTNAME=curlhost
  72. # we try to use the LD_PRELOAD hack, if not a debug build
  73. LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  74. </setenv>
  75. <command>
  76. http://%HOSTIP:%HTTPPORT/2032
  77. </command>
  78. <precheck>
  79. chkhostname curlhost
  80. </precheck>
  81. </client>
  82. # Verify data after the test has been "shot"
  83. <verify>
  84. <strip>
  85. ^User-Agent:.*
  86. </strip>
  87. <protocol>
  88. GET /20320100 HTTP/1.1
  89. Host: 127.0.0.1:%HTTPPORT
  90. Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
  91. Accept: */*
  92. GET /20320100 HTTP/1.1
  93. Host: 127.0.0.1:%HTTPPORT
  94. Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
  95. Accept: */*
  96. GET /20320200 HTTP/1.1
  97. Host: 127.0.0.1:%HTTPPORT
  98. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  99. Accept: */*
  100. GET /20320200 HTTP/1.1
  101. Host: 127.0.0.1:%HTTPPORT
  102. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=
  103. Accept: */*
  104. </protocol>
  105. </verify>
  106. </testcase>