test1008 7.0 KB

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