test91 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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: Magic-Negotiate
  15. WWW-Authenticate: NTLM
  16. WWW-Authenticate: Basic realm="daniel"
  17. Content-Type: text/html; charset=iso-8859-1
  18. Content-Length: 0
  19. Connection: close
  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: Magic-Negotiate
  44. WWW-Authenticate: NTLM
  45. WWW-Authenticate: Basic realm="daniel"
  46. Content-Type: text/html; charset=iso-8859-1
  47. Content-Length: 0
  48. Connection: close
  49. HTTP/1.1 401 Now gimme that second request of crap
  50. Server: Microsoft-IIS/5.0
  51. Content-Length: 34
  52. Content-Type: text/html; charset=iso-8859-1
  53. WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  54. HTTP/1.1 200 Things are fine in server land swsclose
  55. Server: Microsoft-IIS/5.0
  56. Content-Type: text/html; charset=iso-8859-1
  57. Content-Length: 32
  58. Finally, this is the real page!
  59. </datacheck>
  60. </reply>
  61. # Client-side
  62. <client>
  63. <features>
  64. NTLM
  65. !SSPI
  66. debug
  67. </features>
  68. <server>
  69. http
  70. </server>
  71. <name>
  72. HTTP with NTLM/Negotiate/Basic, anyauth and user with domain, with size 0
  73. </name>
  74. <setenv>
  75. # we force our own host name, in order to make the test machine independent
  76. CURL_GETHOSTNAME=curlhost
  77. # we try to use the LD_PRELOAD hack, if not a debug build
  78. LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  79. </setenv>
  80. <command>
  81. http://%HOSTIP:%HTTPPORT/91 --anyauth -u mydomain\\myself:secret
  82. </command>
  83. <precheck>
  84. chkhostname curlhost
  85. </precheck>
  86. </client>
  87. # Verify data after the test has been "shot"
  88. <verify>
  89. <strip>
  90. ^User-Agent:.*
  91. </strip>
  92. <protocol>
  93. GET /91 HTTP/1.1
  94. Host: %HOSTIP:%HTTPPORT
  95. 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
  96. Accept: */*
  97. GET /91 HTTP/1.1
  98. Host: %HOSTIP:%HTTPPORT
  99. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  100. 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
  101. Accept: */*
  102. GET /91 HTTP/1.1
  103. Host: %HOSTIP:%HTTPPORT
  104. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAgACAD2AAAABgAGAP4AAAAIAAgABAEAAAAAAAAAAAAABoKBALJ3z6fQtyQwuFxoPXldKtQ0MzIxNTMyMWnrkzKLCbw9LP1SuH/yJwABAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAbXlkb21haW5teXNlbGZjdXJsaG9zdA==
  105. 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
  106. Accept: */*
  107. </protocol>
  108. </verify>
  109. </testcase>