test265 4.0 KB

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