test243 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP proxy
  7. HTTP proxy NTLM auth
  8. --proxy-anyauth
  9. </keywords>
  10. </info>
  11. # Server-side
  12. <reply>
  13. <data>
  14. HTTP/1.1 407 Authorization Required swsclose
  15. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  16. Proxy-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
  17. Proxy-Authenticate: Basic realm="gimme all yer s3cr3ts"
  18. Proxy-Authenticate: NTLM
  19. Content-Type: text/html; charset=iso-8859-1
  20. Connection: close
  21. This is not the real page
  22. </data>
  23. # this is returned first since we get no proxy-auth
  24. <data1001>
  25. HTTP/1.1 407 Authorization Required to proxy me my dear
  26. Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  27. Content-Length: 34
  28. Hey you, authenticate or go away!
  29. </data1001>
  30. # This is supposed to be returned when the server gets the second
  31. # Authorization: NTLM line passed-in from the client
  32. <data1002>
  33. HTTP/1.1 200 Things are fine in proxy land swsclose
  34. Server: Microsoft-IIS/5.0
  35. Content-Type: text/html; charset=iso-8859-1
  36. Content-Length: 42
  37. Contents of that page you requested, sir.
  38. </data1002>
  39. <datacheck>
  40. HTTP/1.1 407 Authorization Required swsclose
  41. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  42. Proxy-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
  43. Proxy-Authenticate: Basic realm="gimme all yer s3cr3ts"
  44. Proxy-Authenticate: NTLM
  45. Content-Type: text/html; charset=iso-8859-1
  46. Connection: close
  47. HTTP/1.1 407 Authorization Required to proxy me my dear
  48. Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  49. Content-Length: 34
  50. HTTP/1.1 200 Things are fine in proxy land swsclose
  51. Server: Microsoft-IIS/5.0
  52. Content-Type: text/html; charset=iso-8859-1
  53. Content-Length: 42
  54. Contents of that page you requested, sir.
  55. </datacheck>
  56. </reply>
  57. # Client-side
  58. <client>
  59. <server>
  60. http
  61. </server>
  62. <features>
  63. NTLM
  64. !SSPI
  65. debug
  66. </features>
  67. <name>
  68. HTTP POST with --proxy-anyauth, picking NTLM
  69. </name>
  70. <setenv>
  71. # we force our own host name, in order to make the test machine independent
  72. CURL_GETHOSTNAME=curlhost
  73. # we try to use the LD_PRELOAD hack, if not a debug build
  74. LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  75. </setenv>
  76. <command>
  77. http://%HOSTIP:%HTTPPORT/243 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-anyauth -d "postit"
  78. </command>
  79. <precheck>
  80. chkhostname curlhost
  81. </precheck>
  82. </client>
  83. # Verify data after the test has been "shot"
  84. <verify>
  85. <strip>
  86. ^User-Agent: curl/.*
  87. </strip>
  88. <protocol nonewline="yes">
  89. POST http://%HOSTIP:%HTTPPORT/243 HTTP/1.1
  90. Host: %HOSTIP:%HTTPPORT
  91. User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
  92. Accept: */*
  93. Proxy-Connection: Keep-Alive
  94. Content-Length: 6
  95. Content-Type: application/x-www-form-urlencoded
  96. postitPOST http://%HOSTIP:%HTTPPORT/243 HTTP/1.1
  97. Host: %HOSTIP:%HTTPPORT
  98. Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  99. User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
  100. Accept: */*
  101. Proxy-Connection: Keep-Alive
  102. Content-Length: 0
  103. Content-Type: application/x-www-form-urlencoded
  104. POST http://%HOSTIP:%HTTPPORT/243 HTTP/1.1
  105. Host: %HOSTIP:%HTTPPORT
  106. Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
  107. User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
  108. Accept: */*
  109. Proxy-Connection: Keep-Alive
  110. Content-Length: 6
  111. Content-Type: application/x-www-form-urlencoded
  112. postit
  113. </protocol>
  114. </verify>
  115. </testcase>