test1021 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP CONNECT
  7. HTTP proxy
  8. HTTP proxy NTLM auth
  9. --proxy-anyauth
  10. </keywords>
  11. </info>
  12. # Server-side
  13. <reply>
  14. <connect>
  15. HTTP/1.1 407 Authorization Required to proxy me my dear swsclose
  16. Proxy-Authenticate: NTLM
  17. Content-Length: 16
  18. Connection: close
  19. data to discard
  20. </connect>
  21. # this is returned first since we get no proxy-auth
  22. <connect1001>
  23. HTTP/1.1 407 Authorization Required to proxy me my dear
  24. Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  25. Content-Length: 28
  26. 27 bytes and newline to ign
  27. </connect1001>
  28. # This is supposed to be returned when the server gets the second
  29. # Authorization: NTLM line passed-in from the client
  30. <connect1002>
  31. HTTP/1.1 200 Things are fine in proxy land
  32. Server: Microsoft-IIS/5.0
  33. Content-Type: text/html; charset=iso-8859-1
  34. </connect1002>
  35. # this is returned when we get a GET!
  36. <data2>
  37. HTTP/1.1 200 OK
  38. Date: Thu, 09 Nov 2010 14:49:00 GMT
  39. Content-Length: 7
  40. Connection: close
  41. Content-Type: text/html
  42. Funny-head: yesyes
  43. daniel
  44. </data2>
  45. # then this is returned when we get proxy-auth
  46. <data1000>
  47. HTTP/1.1 200 OK swsbounce
  48. Server: no
  49. Nice proxy auth sir!
  50. </data1000>
  51. <datacheck>
  52. HTTP/1.1 407 Authorization Required to proxy me my dear swsclose
  53. Proxy-Authenticate: NTLM
  54. Content-Length: 16
  55. Connection: close
  56. HTTP/1.1 407 Authorization Required to proxy me my dear
  57. Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  58. Content-Length: 28
  59. HTTP/1.1 200 Things are fine in proxy land
  60. Server: Microsoft-IIS/5.0
  61. Content-Type: text/html; charset=iso-8859-1
  62. HTTP/1.1 200 OK
  63. Date: Thu, 09 Nov 2010 14:49:00 GMT
  64. Content-Length: 7
  65. Connection: close
  66. Content-Type: text/html
  67. Funny-head: yesyes
  68. daniel
  69. </datacheck>
  70. </reply>
  71. # Client-side
  72. <client>
  73. <server>
  74. http
  75. </server>
  76. <features>
  77. NTLM
  78. !SSPI
  79. debug
  80. </features>
  81. <name>
  82. HTTP proxy CONNECT with any proxyauth and proxy offers NTLM and close
  83. </name>
  84. <setenv>
  85. # we force our own host name, in order to make the test machine independent
  86. CURL_GETHOSTNAME=curlhost
  87. # we try to use the LD_PRELOAD hack, if not a debug build
  88. LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  89. </setenv>
  90. <command>
  91. http://test.remote.example.com.1021:%HTTPPORT/path/10210002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-anyauth --proxytunnel
  92. </command>
  93. <precheck>
  94. chkhostname curlhost
  95. </precheck>
  96. </client>
  97. # Verify data after the test has been "shot"
  98. <verify>
  99. <strip>
  100. ^User-Agent: curl/.*
  101. </strip>
  102. <protocol>
  103. CONNECT test.remote.example.com.1021:%HTTPPORT HTTP/1.1
  104. Host: test.remote.example.com.1021:%HTTPPORT
  105. Proxy-Connection: Keep-Alive
  106. CONNECT test.remote.example.com.1021:%HTTPPORT HTTP/1.1
  107. Host: test.remote.example.com.1021:%HTTPPORT
  108. Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  109. Proxy-Connection: Keep-Alive
  110. CONNECT test.remote.example.com.1021:%HTTPPORT HTTP/1.1
  111. Host: test.remote.example.com.1021:%HTTPPORT
  112. Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
  113. Proxy-Connection: Keep-Alive
  114. GET /path/10210002 HTTP/1.1
  115. User-Agent: curl/7.12.3-CVS (i686-pc-linux-gnu) libcurl/7.12.3-CVS OpenSSL/0.9.6b zlib/1.1.4
  116. Host: test.remote.example.com.1021:%HTTPPORT
  117. Accept: */*
  118. </protocol>
  119. </verify>
  120. </testcase>