test1215 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <testcase>
  2. <info>
  3. # This test is a copy of test 67, modified to use a HTTP proxy.
  4. <keywords>
  5. HTTP
  6. HTTP GET
  7. HTTP NTLM auth
  8. HTTP proxy
  9. </keywords>
  10. </info>
  11. # Server-side
  12. <reply>
  13. <!-- no <data> in this test since we have NTLM from the start
  14. This is supposed to be returned when the server gets a first
  15. Authorization: NTLM line passed-in from the client -->
  16. <data1001>
  17. HTTP/1.1 401 Now gimme that second request of crap
  18. Server: Microsoft-IIS/5.0
  19. Content-Type: text/html; charset=iso-8859-1
  20. Content-Length: 34
  21. WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  22. This is not the real page either!
  23. </data1001>
  24. # This is supposed to be returned when the server gets the second
  25. # Authorization: NTLM line passed-in from the client
  26. <data1002>
  27. HTTP/1.1 200 Things are fine in server land swsclose
  28. Server: Microsoft-IIS/5.0
  29. Content-Type: text/html; charset=iso-8859-1
  30. Content-Length: 32
  31. Finally, this is the real page!
  32. </data1002>
  33. <datacheck>
  34. HTTP/1.1 401 Now gimme that second request of crap
  35. Server: Microsoft-IIS/5.0
  36. Content-Type: text/html; charset=iso-8859-1
  37. Content-Length: 34
  38. WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  39. HTTP/1.1 200 Things are fine in server land swsclose
  40. Server: Microsoft-IIS/5.0
  41. Content-Type: text/html; charset=iso-8859-1
  42. Content-Length: 32
  43. Finally, this is the real page!
  44. </datacheck>
  45. </reply>
  46. # Client-side
  47. <client>
  48. <features>
  49. NTLM
  50. !SSPI
  51. debug
  52. </features>
  53. <server>
  54. http
  55. </server>
  56. <name>
  57. HTTP with server NTLM authorization using a proxy
  58. </name>
  59. <setenv>
  60. # we force our own host name, in order to make the test machine independent
  61. CURL_GETHOSTNAME=curlhost
  62. # we try to use the LD_PRELOAD hack, if not a debug build
  63. LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  64. </setenv>
  65. <command>
  66. http://%HOSTIP:%HTTPPORT/1215 -u testuser:testpass --ntlm --proxy http://%HOSTIP:%HTTPPORT
  67. </command>
  68. <precheck>
  69. chkhostname curlhost
  70. </precheck>
  71. </client>
  72. # Verify data after the test has been "shot"
  73. <verify>
  74. <strip>
  75. ^User-Agent:.*
  76. </strip>
  77. <protocol>
  78. GET http://%HOSTIP:%HTTPPORT/1215 HTTP/1.1
  79. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  80. User-Agent: curl/7.30.0-DEV
  81. Host: %HOSTIP:%HTTPPORT
  82. Accept: */*
  83. Proxy-Connection: Keep-Alive
  84. GET http://%HOSTIP:%HTTPPORT/1215 HTTP/1.1
  85. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
  86. User-Agent: curl/7.30.0-DEV
  87. Host: %HOSTIP:%HTTPPORT
  88. Accept: */*
  89. Proxy-Connection: Keep-Alive
  90. </protocol>
  91. </verify>
  92. </testcase>