test1021 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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: 21
  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. And you should ignore this data.
  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: 21
  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. </features>
  79. <name>
  80. HTTP proxy CONNECT with any proxyauth and proxy offers NTLM and close
  81. </name>
  82. <setenv>
  83. # we force our own host name, in order to make the test machine independent
  84. CURL_GETHOSTNAME=curlhost
  85. # we try to use the LD_PRELOAD hack, if not a debug build
  86. LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  87. </setenv>
  88. <command>
  89. http://test.remote.example.com.1021:%HTTPPORT/path/10210002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-anyauth --proxytunnel
  90. </command>
  91. <precheck>
  92. chkhostname curlhost
  93. </precheck>
  94. </client>
  95. # Verify data after the test has been "shot"
  96. <verify>
  97. <strip>
  98. ^User-Agent: curl/.*
  99. </strip>
  100. <protocol>
  101. CONNECT test.remote.example.com.1021:%HTTPPORT HTTP/1.1
  102. Host: test.remote.example.com.1021:%HTTPPORT
  103. Proxy-Connection: Keep-Alive
  104. CONNECT test.remote.example.com.1021:%HTTPPORT HTTP/1.1
  105. Host: test.remote.example.com.1021:%HTTPPORT
  106. Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  107. Proxy-Connection: Keep-Alive
  108. CONNECT test.remote.example.com.1021:%HTTPPORT HTTP/1.1
  109. Host: test.remote.example.com.1021:%HTTPPORT
  110. Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q=
  111. Proxy-Connection: Keep-Alive
  112. GET /path/10210002 HTTP/1.1
  113. User-Agent: curl/7.12.3-CVS (i686-pc-linux-gnu) libcurl/7.12.3-CVS OpenSSL/0.9.6b zlib/1.1.4
  114. Host: test.remote.example.com.1021:%HTTPPORT
  115. Accept: */*
  116. </protocol>
  117. </verify>
  118. </testcase>