test243 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP proxy
  7. HTTP proxy NTLM auth
  8. --proxy-anyauth
  9. NTLM
  10. </keywords>
  11. </info>
  12. # Server-side
  13. <reply>
  14. <data>
  15. HTTP/1.1 407 Authorization Required swsclose
  16. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  17. Proxy-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
  18. Proxy-Authenticate: Basic realm="gimme all yer s3cr3ts"
  19. Proxy-Authenticate: NTLM
  20. Content-Type: text/html; charset=iso-8859-1
  21. Connection: close
  22. This is not the real page
  23. </data>
  24. # this is returned first since we get no proxy-auth
  25. <data1001>
  26. HTTP/1.1 407 Authorization Required to proxy me my dear
  27. Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  28. Content-Length: 34
  29. Hey you, authenticate or go away!
  30. </data1001>
  31. # This is supposed to be returned when the server gets the second
  32. # Authorization: NTLM line passed-in from the client
  33. <data1002>
  34. HTTP/1.1 200 Things are fine in proxy land swsclose
  35. Server: Microsoft-IIS/5.0
  36. Content-Type: text/html; charset=iso-8859-1
  37. Content-Length: 42
  38. Contents of that page you requested, sir.
  39. </data1002>
  40. <datacheck>
  41. HTTP/1.1 407 Authorization Required swsclose
  42. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  43. Proxy-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
  44. Proxy-Authenticate: Basic realm="gimme all yer s3cr3ts"
  45. Proxy-Authenticate: NTLM
  46. Content-Type: text/html; charset=iso-8859-1
  47. Connection: close
  48. HTTP/1.1 407 Authorization Required to proxy me my dear
  49. Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  50. Content-Length: 34
  51. HTTP/1.1 200 Things are fine in proxy land swsclose
  52. Server: Microsoft-IIS/5.0
  53. Content-Type: text/html; charset=iso-8859-1
  54. Content-Length: 42
  55. Contents of that page you requested, sir.
  56. </datacheck>
  57. </reply>
  58. # Client-side
  59. <client>
  60. <server>
  61. http
  62. </server>
  63. <features>
  64. NTLM
  65. SSL
  66. !SSPI
  67. proxy
  68. </features>
  69. <name>
  70. HTTP POST with --proxy-anyauth, picking NTLM
  71. </name>
  72. <command>
  73. http://%HOSTIP:%HTTPPORT/%TESTNUMBER --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-anyauth -d "postit"
  74. </command>
  75. </client>
  76. # Verify data after the test has been "shot"
  77. <verify>
  78. <protocol nonewline="yes">
  79. POST http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1
  80. Host: %HOSTIP:%HTTPPORT
  81. User-Agent: curl/%VERSION
  82. Accept: */*
  83. Proxy-Connection: Keep-Alive
  84. Content-Length: 6
  85. Content-Type: application/x-www-form-urlencoded
  86. postitPOST http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1
  87. Host: %HOSTIP:%HTTPPORT
  88. Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  89. User-Agent: curl/%VERSION
  90. Accept: */*
  91. Proxy-Connection: Keep-Alive
  92. Content-Length: 0
  93. Content-Type: application/x-www-form-urlencoded
  94. POST http://%HOSTIP:%HTTPPORT/%TESTNUMBER HTTP/1.1
  95. Host: %HOSTIP:%HTTPPORT
  96. Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
  97. User-Agent: curl/%VERSION
  98. Accept: */*
  99. Proxy-Connection: Keep-Alive
  100. Content-Length: 6
  101. Content-Type: application/x-www-form-urlencoded
  102. postit
  103. </protocol>
  104. </verify>
  105. </testcase>