2
0

test243 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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. </features>
  65. <name>
  66. HTTP POST with --proxy-anyauth, picking NTLM
  67. </name>
  68. <setenv>
  69. # we force our own host name, in order to make the test machine independent
  70. CURL_GETHOSTNAME=curlhost
  71. # we try to use the LD_PRELOAD hack, if not a debug build
  72. LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  73. </setenv>
  74. <command>
  75. http://%HOSTIP:%HTTPPORT/243 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-anyauth -d "postit"
  76. </command>
  77. <precheck>
  78. chkhostname curlhost
  79. </precheck>
  80. </client>
  81. # Verify data after the test has been "shot"
  82. <verify>
  83. <strip>
  84. ^User-Agent: curl/.*
  85. </strip>
  86. <protocol nonewline="yes">
  87. POST http://%HOSTIP:%HTTPPORT/243 HTTP/1.1
  88. 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
  89. Host: %HOSTIP:%HTTPPORT
  90. Accept: */*
  91. Proxy-Connection: Keep-Alive
  92. Content-Length: 6
  93. Content-Type: application/x-www-form-urlencoded
  94. postitPOST http://%HOSTIP:%HTTPPORT/243 HTTP/1.1
  95. Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  96. 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
  97. Host: %HOSTIP:%HTTPPORT
  98. Accept: */*
  99. Proxy-Connection: Keep-Alive
  100. Content-Length: 0
  101. Content-Type: application/x-www-form-urlencoded
  102. POST http://%HOSTIP:%HTTPPORT/243 HTTP/1.1
  103. Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q=
  104. 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
  105. Host: %HOSTIP:%HTTPPORT
  106. Accept: */*
  107. Proxy-Connection: Keep-Alive
  108. Content-Length: 6
  109. Content-Type: application/x-www-form-urlencoded
  110. postit
  111. </protocol>
  112. </verify>
  113. </testcase>