test213 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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.1 407 Authorization Required to proxy me my dear
  16. Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  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: Thu, 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 TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  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: Thu, 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. !SSPI
  67. debug
  68. </features>
  69. <name>
  70. HTTP 1.0 proxy CONNECT auth NTLM and then POST
  71. </name>
  72. <setenv>
  73. # we force our own host name, in order to make the test machine independent
  74. CURL_GETHOSTNAME=curlhost
  75. # we try to use the LD_PRELOAD hack, if not a debug build
  76. LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  77. </setenv>
  78. <command>
  79. http://test.remote.example.com.213:%HTTPPORT/path/2130002 --proxy1.0 http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --proxytunnel -d "postit"
  80. </command>
  81. <precheck>
  82. chkhostname curlhost
  83. </precheck>
  84. </client>
  85. # Verify data after the test has been "shot"
  86. <verify>
  87. <strip>
  88. ^User-Agent: curl/.*
  89. </strip>
  90. <protocol nonewline="yes">
  91. CONNECT test.remote.example.com.213:%HTTPPORT HTTP/1.0
  92. Host: test.remote.example.com.213:%HTTPPORT
  93. Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  94. Proxy-Connection: Keep-Alive
  95. CONNECT test.remote.example.com.213:%HTTPPORT HTTP/1.0
  96. Host: test.remote.example.com.213:%HTTPPORT
  97. Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
  98. Proxy-Connection: Keep-Alive
  99. POST /path/2130002 HTTP/1.1
  100. User-Agent: curl/7.12.3-CVS (i686-pc-linux-gnu) libcurl/7.12.3-CVS OpenSSL/0.9.6b zlib/1.1.4
  101. Host: test.remote.example.com.213:%HTTPPORT
  102. Accept: */*
  103. Content-Length: 6
  104. Content-Type: application/x-www-form-urlencoded
  105. postit
  106. </protocol>
  107. </verify>
  108. </testcase>