test265 4.1 KB

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