test265 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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 TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  17. Content-Length: 1033
  18. And you should ignore this data.
  19. QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ
  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: Tue, 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 TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  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: Tue, 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. SSL
  68. !SSPI
  69. debug
  70. proxy
  71. </features>
  72. <name>
  73. HTTP proxy CONNECT auth NTLM and then POST, response-body in the 407
  74. </name>
  75. <setenv>
  76. # we force our own host name, in order to make the test machine independent
  77. CURL_GETHOSTNAME=curlhost
  78. # we try to use the LD_PRELOAD hack, if not a debug build
  79. LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  80. </setenv>
  81. <command>
  82. http://test.remote.example.com.%TESTNUMBER:%HTTPPORT/path/%TESTNUMBER0002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --proxytunnel -d "postit"
  83. </command>
  84. <precheck>
  85. chkhostname curlhost
  86. </precheck>
  87. </client>
  88. # Verify data after the test has been "shot"
  89. <verify>
  90. <protocol nonewline="yes">
  91. CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1
  92. Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT
  93. Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  94. User-Agent: curl/%VERSION
  95. Proxy-Connection: Keep-Alive
  96. CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1
  97. Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT
  98. Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
  99. User-Agent: curl/%VERSION
  100. Proxy-Connection: Keep-Alive
  101. POST /path/%TESTNUMBER0002 HTTP/1.1
  102. Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT
  103. User-Agent: curl/%VERSION
  104. Accept: */*
  105. Content-Length: 6
  106. Content-Type: application/x-www-form-urlencoded
  107. postit
  108. </protocol>
  109. </verify>
  110. </testcase>