test265 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP POST
  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.0 407 Authorization Required to proxy me my dear
  16. Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  17. Content-Length: 1033
  18. And you should ignore this data.
  19. QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQz
  20. </connect1001>
  21. # This is supposed to be returned when the server gets the second
  22. # Authorization: NTLM line passed-in from the client
  23. <connect1002>
  24. HTTP/1.1 200 Things are fine in proxy land
  25. Server: Microsoft-IIS/5.0
  26. Content-Type: text/html; charset=iso-8859-1
  27. </connect1002>
  28. # this is returned when we get a GET!
  29. <data2>
  30. HTTP/1.1 200 OK
  31. Date: Thu, 09 Nov 2010 14:49:00 GMT
  32. Content-Length: 7
  33. Connection: close
  34. Content-Type: text/html
  35. Funny-head: yesyes
  36. daniel
  37. </data2>
  38. # then this is returned when we get proxy-auth
  39. <data1000>
  40. HTTP/1.1 200 OK swsbounce
  41. Server: no
  42. Nice proxy auth sir!
  43. </data1000>
  44. <datacheck>
  45. HTTP/1.0 407 Authorization Required to proxy me my dear
  46. Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  47. Content-Length: 1033
  48. HTTP/1.1 200 Things are fine in proxy land
  49. Server: Microsoft-IIS/5.0
  50. Content-Type: text/html; charset=iso-8859-1
  51. HTTP/1.1 200 OK
  52. Date: Thu, 09 Nov 2010 14:49:00 GMT
  53. Content-Length: 7
  54. Connection: close
  55. Content-Type: text/html
  56. Funny-head: yesyes
  57. daniel
  58. </datacheck>
  59. </reply>
  60. # Client-side
  61. <client>
  62. <server>
  63. http
  64. </server>
  65. <features>
  66. NTLM
  67. !SSPI
  68. debug
  69. </features>
  70. <name>
  71. HTTP proxy CONNECT auth NTLM and then POST, response-body in the 407
  72. </name>
  73. <setenv>
  74. # we force our own host name, in order to make the test machine independent
  75. CURL_GETHOSTNAME=curlhost
  76. # we try to use the LD_PRELOAD hack, if not a debug build
  77. LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  78. </setenv>
  79. <command>
  80. http://test.remote.example.com.265:%HTTPPORT/path/2650002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --proxytunnel -d "postit"
  81. </command>
  82. <precheck>
  83. chkhostname curlhost
  84. </precheck>
  85. </client>
  86. # Verify data after the test has been "shot"
  87. <verify>
  88. <strip>
  89. ^User-Agent: curl/.*
  90. </strip>
  91. <protocol nonewline="yes">
  92. CONNECT test.remote.example.com.265:%HTTPPORT HTTP/1.1
  93. Host: test.remote.example.com.265:%HTTPPORT
  94. Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  95. Proxy-Connection: Keep-Alive
  96. CONNECT test.remote.example.com.265:%HTTPPORT HTTP/1.1
  97. Host: test.remote.example.com.265:%HTTPPORT
  98. Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
  99. Proxy-Connection: Keep-Alive
  100. POST /path/2650002 HTTP/1.1
  101. User-Agent: curl/7.12.3-CVS (i686-pc-linux-gnu) libcurl/7.12.3-CVS OpenSSL/0.9.6b zlib/1.1.4
  102. Host: test.remote.example.com.265:%HTTPPORT
  103. Accept: */*
  104. Content-Length: 6
  105. Content-Type: application/x-www-form-urlencoded
  106. postit
  107. </protocol>
  108. </verify>
  109. </testcase>