test213 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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.1 407 Authorization Required to proxy me my dear
  17. Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  18. Content-Length: 33
  19. And you should ignore this data.
  20. </connect1001>
  21. # This is supposed to be returned when the server gets the second
  22. # Authorization: NTLM line passed-in from the client
  23. <connect1002>
  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. </connect1002>
  28. # this is returned when we get a GET!
  29. <data2>
  30. HTTP/1.1 200 OK
  31. Date: Tue, 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.1 407 Authorization Required to proxy me my dear
  46. Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  47. Content-Length: 33
  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: Tue, 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. SSL
  68. !SSPI
  69. proxy
  70. </features>
  71. <name>
  72. HTTP 1.0 proxy CONNECT auth NTLM and then POST
  73. </name>
  74. <command>
  75. http://test.remote.example.com.%TESTNUMBER:%HTTPPORT/path/%TESTNUMBER0002 --proxy1.0 http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --proxytunnel -d "postit"
  76. </command>
  77. </client>
  78. # Verify data after the test has been "shot"
  79. <verify>
  80. <protocol nonewline="yes">
  81. CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.0
  82. Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT
  83. Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  84. User-Agent: curl/%VERSION
  85. Proxy-Connection: Keep-Alive
  86. CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.0
  87. Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT
  88. Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
  89. User-Agent: curl/%VERSION
  90. Proxy-Connection: Keep-Alive
  91. POST /path/%TESTNUMBER0002 HTTP/1.1
  92. Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT
  93. User-Agent: curl/%VERSION
  94. Accept: */*
  95. Content-Length: 6
  96. Content-Type: application/x-www-form-urlencoded
  97. postit
  98. </protocol>
  99. </verify>
  100. </testcase>