2
0

test209 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP CONNECT
  7. HTTP proxy
  8. HTTP proxy NTLM auth
  9. </keywords>
  10. </info>
  11. # Server-side
  12. <reply>
  13. # this is returned first since we get no proxy-auth
  14. <connect1001>
  15. HTTP/1.1 407 Authorization Required to proxy me my dear
  16. Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  17. Content-Length: 33
  18. And you should ignore this data.
  19. </connect1001>
  20. # This is supposed to be returned when the server gets the second
  21. # Authorization: NTLM line passed-in from the client
  22. <connect1002>
  23. HTTP/1.1 200 Things are fine in proxy land
  24. Server: Microsoft-IIS/5.0
  25. Content-Type: text/html; charset=iso-8859-1
  26. </connect1002>
  27. # this is returned when we get a GET!
  28. <data2>
  29. HTTP/1.1 200 OK
  30. Date: Tue, 09 Nov 2010 14:49:00 GMT
  31. Content-Length: 7
  32. Connection: close
  33. Content-Type: text/html
  34. Funny-head: yesyes
  35. daniel
  36. </data2>
  37. # then this is returned when we get proxy-auth
  38. <data1000>
  39. HTTP/1.1 200 OK swsbounce
  40. Server: no
  41. Nice proxy auth sir!
  42. </data1000>
  43. <datacheck>
  44. HTTP/1.1 407 Authorization Required to proxy me my dear
  45. Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  46. Content-Length: 33
  47. HTTP/1.1 200 Things are fine in proxy land
  48. Server: Microsoft-IIS/5.0
  49. Content-Type: text/html; charset=iso-8859-1
  50. HTTP/1.1 200 OK
  51. Date: Tue, 09 Nov 2010 14:49:00 GMT
  52. Content-Length: 7
  53. Connection: close
  54. Content-Type: text/html
  55. Funny-head: yesyes
  56. daniel
  57. </datacheck>
  58. </reply>
  59. # Client-side
  60. <client>
  61. <server>
  62. http
  63. </server>
  64. <features>
  65. NTLM
  66. SSL
  67. !SSPI
  68. debug
  69. proxy
  70. </features>
  71. <name>
  72. HTTP proxy CONNECT auth NTLM
  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://test.remote.example.com.%TESTNUMBER:%HTTPPORT/path/%TESTNUMBER0002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --proxytunnel
  82. </command>
  83. <precheck>
  84. chkhostname curlhost
  85. </precheck>
  86. </client>
  87. # Verify data after the test has been "shot"
  88. <verify>
  89. <protocol>
  90. CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1
  91. Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT
  92. Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  93. User-Agent: curl/%VERSION
  94. Proxy-Connection: Keep-Alive
  95. CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1
  96. Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT
  97. Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
  98. User-Agent: curl/%VERSION
  99. Proxy-Connection: Keep-Alive
  100. GET /path/%TESTNUMBER0002 HTTP/1.1
  101. Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT
  102. User-Agent: curl/%VERSION
  103. Accept: */*
  104. </protocol>
  105. </verify>
  106. </testcase>