test68 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. # This is supposed to be returned when the server gets a first
  12. # Authorization: NTLM line passed-in from the client
  13. <data1001>
  14. HTTP/1.1 401 Now gimme that second request of crap
  15. Server: Microsoft-IIS/5.0
  16. Content-Length: 34
  17. Content-Type: text/html; charset=iso-8859-1
  18. WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  19. This is not the real page either!
  20. </data1001>
  21. # This is supposed to be returned when the server gets the second
  22. # Authorization: NTLM line passed-in from the client
  23. <data1002>
  24. HTTP/1.1 401 You give me wrong password
  25. Server: Microsoft-IIS/5.0
  26. WWW-Authenticate: NTLM
  27. Content-Length: 46
  28. Content-Type: text/html; charset=iso-8859-1
  29. Wrong password dude. Get it fixed and return.
  30. </data1002>
  31. <datacheck>
  32. HTTP/1.1 401 Now gimme that second request of crap
  33. Server: Microsoft-IIS/5.0
  34. Content-Length: 34
  35. Content-Type: text/html; charset=iso-8859-1
  36. WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  37. HTTP/1.1 401 You give me wrong password
  38. Server: Microsoft-IIS/5.0
  39. WWW-Authenticate: NTLM
  40. Content-Length: 46
  41. Content-Type: text/html; charset=iso-8859-1
  42. Wrong password dude. Get it fixed and return.
  43. </datacheck>
  44. </reply>
  45. # Client-side
  46. <client>
  47. <features>
  48. NTLM
  49. </features>
  50. <server>
  51. http
  52. </server>
  53. <name>
  54. HTTP with NTLM authorization and wrong password
  55. </name>
  56. <setenv>
  57. # we force our own host name, in order to make the test machine independent
  58. CURL_GETHOSTNAME=curlhost
  59. # we try to use the LD_PRELOAD hack, if not a debug build
  60. LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  61. </setenv>
  62. <command>
  63. http://%HOSTIP:%HTTPPORT/68 -u testuser:testpass --ntlm
  64. </command>
  65. <precheck>
  66. chkhostname curlhost
  67. </precheck>
  68. </client>
  69. # Verify data after the test has been "shot"
  70. <verify>
  71. <strip>
  72. ^User-Agent:.*
  73. </strip>
  74. <protocol>
  75. GET /68 HTTP/1.1
  76. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  77. 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
  78. Host: %HOSTIP:%HTTPPORT
  79. Accept: */*
  80. GET /68 HTTP/1.1
  81. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
  82. 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
  83. Host: %HOSTIP:%HTTPPORT
  84. Accept: */*
  85. </protocol>
  86. </verify>
  87. </testcase>