2
0

test1008 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP CONNECT
  7. HTTP proxy
  8. HTTP proxy NTLM auth
  9. chunked Transfer-Encoding
  10. NTLM
  11. </keywords>
  12. </info>
  13. # Server-side
  14. <reply>
  15. <servercmd>
  16. connection-monitor
  17. </servercmd>
  18. # this is returned first since we get no proxy-auth
  19. <connect1001>
  20. HTTP/1.1 407 Authorization Required to proxy me my dear
  21. Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  22. Transfer-Encoding: chunked
  23. 20
  24. And you should ignore this data.
  25. FA0
  26. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX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XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  27. 0
  28. </connect1001>
  29. # This is supposed to be returned when the server gets the second
  30. # Authorization: NTLM line passed-in from the client
  31. <connect1002>
  32. HTTP/1.1 200 Things are fine in proxy land
  33. Server: Microsoft-IIS/5.0
  34. Content-Type: text/html; charset=iso-8859-1
  35. </connect1002>
  36. # this is returned when we get a GET!
  37. <data2>
  38. HTTP/1.1 200 OK
  39. Date: Tue, 09 Nov 2010 14:49:00 GMT
  40. Content-Length: 7
  41. Connection: close
  42. Content-Type: text/html
  43. Funny-head: yesyes
  44. daniel
  45. </data2>
  46. # then this is returned when we get proxy-auth
  47. <data1000>
  48. HTTP/1.1 200 OK swsbounce
  49. Server: no
  50. Nice proxy auth sir!
  51. </data1000>
  52. <datacheck>
  53. HTTP/1.1 407 Authorization Required to proxy me my dear
  54. Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  55. Transfer-Encoding: chunked
  56. HTTP/1.1 200 Things are fine in proxy land
  57. Server: Microsoft-IIS/5.0
  58. Content-Type: text/html; charset=iso-8859-1
  59. HTTP/1.1 200 OK
  60. Date: Tue, 09 Nov 2010 14:49:00 GMT
  61. Content-Length: 7
  62. Connection: close
  63. Content-Type: text/html
  64. Funny-head: yesyes
  65. daniel
  66. </datacheck>
  67. </reply>
  68. # Client-side
  69. <client>
  70. <server>
  71. http
  72. </server>
  73. <features>
  74. NTLM
  75. SSL
  76. !SSPI
  77. proxy
  78. </features>
  79. <name>
  80. HTTP proxy CONNECT auth NTLM with chunked-encoded 407 response
  81. </name>
  82. <command>
  83. http://test.remote.example.com.%TESTNUMBER:%HTTPPORT/path/%TESTNUMBER0002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --proxytunnel
  84. </command>
  85. </client>
  86. # Verify data after the test has been "shot"
  87. <verify>
  88. <protocol>
  89. CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1
  90. Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT
  91. Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  92. User-Agent: curl/%VERSION
  93. Proxy-Connection: Keep-Alive
  94. CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1
  95. Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT
  96. Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
  97. User-Agent: curl/%VERSION
  98. Proxy-Connection: Keep-Alive
  99. GET /path/%TESTNUMBER0002 HTTP/1.1
  100. Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT
  101. User-Agent: curl/%VERSION
  102. Accept: */*
  103. [DISCONNECT]
  104. </protocol>
  105. </verify>
  106. </testcase>