test1215 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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 TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  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 TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  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. SSL
  51. !SSPI
  52. debug
  53. proxy
  54. </features>
  55. <server>
  56. http
  57. </server>
  58. <name>
  59. HTTP with server NTLM authorization using a proxy
  60. </name>
  61. <setenv>
  62. # we force our own host name, in order to make the test machine independent
  63. CURL_GETHOSTNAME=curlhost
  64. # we try to use the LD_PRELOAD hack, if not a debug build
  65. LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  66. </setenv>
  67. <command>
  68. http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --ntlm --proxy http://%HOSTIP:%HTTPPORT
  69. </command>
  70. <precheck>
  71. chkhostname curlhost
  72. </precheck>
  73. </client>
  74. # Verify data after the test has been "shot"
  75. <verify>
  76. <protocol>
  77. GET http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1
  78. Host: %HOSTIP:%HTTPPORT
  79. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  80. User-Agent: curl/%VERSION
  81. Accept: */*
  82. Proxy-Connection: Keep-Alive
  83. GET http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1
  84. Host: %HOSTIP:%HTTPPORT
  85. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
  86. User-Agent: curl/%VERSION
  87. Accept: */*
  88. Proxy-Connection: Keep-Alive
  89. </protocol>
  90. </verify>
  91. </testcase>