test1021 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP CONNECT
  7. HTTP proxy
  8. HTTP proxy NTLM auth
  9. --proxy-anyauth
  10. NTLM
  11. </keywords>
  12. </info>
  13. # Server-side
  14. <reply>
  15. <connect>
  16. HTTP/1.1 407 Authorization Required to proxy me my dear swsclose
  17. Proxy-Authenticate: NTLM
  18. Content-Length: 16
  19. Connection: close
  20. data to discard
  21. </connect>
  22. # this is returned first since we get no proxy-auth
  23. <connect1001>
  24. HTTP/1.1 407 Authorization Required to proxy me my dear
  25. Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  26. Content-Length: 28
  27. 27 bytes and newline to ign
  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 swsclose
  54. Proxy-Authenticate: NTLM
  55. Content-Length: 16
  56. Connection: close
  57. HTTP/1.1 407 Authorization Required to proxy me my dear
  58. Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  59. Content-Length: 28
  60. HTTP/1.1 200 Things are fine in proxy land
  61. Server: Microsoft-IIS/5.0
  62. Content-Type: text/html; charset=iso-8859-1
  63. HTTP/1.1 200 OK
  64. Date: Tue, 09 Nov 2010 14:49:00 GMT
  65. Content-Length: 7
  66. Connection: close
  67. Content-Type: text/html
  68. Funny-head: yesyes
  69. daniel
  70. </datacheck>
  71. </reply>
  72. # Client-side
  73. <client>
  74. <server>
  75. http
  76. </server>
  77. <features>
  78. NTLM
  79. SSL
  80. !SSPI
  81. proxy
  82. </features>
  83. <name>
  84. HTTP proxy CONNECT with any proxyauth and proxy offers NTLM and close
  85. </name>
  86. <command>
  87. http://test.remote.example.com.%TESTNUMBER:%HTTPPORT/path/%TESTNUMBER0002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-anyauth --proxytunnel
  88. </command>
  89. </client>
  90. # Verify data after the test has been "shot"
  91. <verify>
  92. <protocol>
  93. CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1
  94. Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT
  95. User-Agent: curl/%VERSION
  96. Proxy-Connection: Keep-Alive
  97. CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1
  98. Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT
  99. Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  100. User-Agent: curl/%VERSION
  101. Proxy-Connection: Keep-Alive
  102. CONNECT test.remote.example.com.%TESTNUMBER:%HTTPPORT HTTP/1.1
  103. Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT
  104. Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
  105. User-Agent: curl/%VERSION
  106. Proxy-Connection: Keep-Alive
  107. GET /path/%TESTNUMBER0002 HTTP/1.1
  108. Host: test.remote.example.com.%TESTNUMBER:%HTTPPORT
  109. User-Agent: curl/%VERSION
  110. Accept: */*
  111. </protocol>
  112. </verify>
  113. </testcase>