2
0

test265 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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. <data1001>
  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. </data1001>
  21. # This is supposed to be returned when the server gets the second
  22. # Authorization: NTLM line passed-in from the client
  23. <data1002>
  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. </data1002>
  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. </features>
  68. <name>
  69. HTTP proxy CONNECT auth NTLM and then POST, response-body in the 407
  70. </name>
  71. <setenv>
  72. # we force our own host name, in order to make the test machine independent
  73. CURL_GETHOSTNAME=curlhost
  74. # we try to use the LD_PRELOAD hack, if not a debug build
  75. LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  76. </setenv>
  77. <command>
  78. http://test.remote.example.com:265/path/2650002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel -d "postit"
  79. </command>
  80. <precheck>
  81. chkhostname curlhost
  82. </precheck>
  83. </client>
  84. # Verify data after the test has been "shot"
  85. <verify>
  86. <strip>
  87. ^User-Agent: curl/.*
  88. </strip>
  89. <protocol nonewline="yes">
  90. CONNECT test.remote.example.com:265 HTTP/1.1
  91. Host: test.remote.example.com:265
  92. Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  93. Proxy-Connection: Keep-Alive
  94. CONNECT test.remote.example.com:265 HTTP/1.1
  95. Host: test.remote.example.com:265
  96. Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q=
  97. Proxy-Connection: Keep-Alive
  98. POST /path/2650002 HTTP/1.1
  99. User-Agent: curl/7.12.3-CVS (i686-pc-linux-gnu) libcurl/7.12.3-CVS OpenSSL/0.9.6b zlib/1.1.4
  100. Host: test.remote.example.com:265
  101. Accept: */*
  102. Content-Length: 6
  103. Content-Type: application/x-www-form-urlencoded
  104. postit
  105. </protocol>
  106. </verify>
  107. </testcase>