test2032 3.2 KB

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