test555 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <testcase>
  2. # NOTE: this test case is a duplicate of 547 but the tool is built to use the
  3. # multi interface instead of easy, but that shouldn't be noticable at all in
  4. # this file!
  5. <info>
  6. <keywords>
  7. HTTP
  8. HTTP POST
  9. POST callback
  10. HTTP proxy
  11. HTTP proxy NTLM auth
  12. multi
  13. </keywords>
  14. </info>
  15. # Server-side
  16. <reply>
  17. <data>
  18. HTTP/1.1 407 Authorization Required swsclose
  19. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  20. Proxy-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
  21. Proxy-Authenticate: Basic realm="gimme all yer s3cr3ts"
  22. Proxy-Authenticate: NTLM
  23. Content-Type: text/html; charset=iso-8859-1
  24. Connection: close
  25. This is not the real page
  26. </data>
  27. # this is returned first since we get no proxy-auth
  28. <data1001>
  29. HTTP/1.1 407 Authorization Required to proxy me my dear
  30. Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  31. Content-Length: 34
  32. Hey you, authenticate or go away!
  33. </data1001>
  34. # This is supposed to be returned when the server gets the second
  35. # Authorization: NTLM line passed-in from the client
  36. <data1002>
  37. HTTP/1.1 200 Things are fine in proxy land swsclose
  38. Server: Microsoft-IIS/5.0
  39. Content-Type: text/html; charset=iso-8859-1
  40. Content-Length: 42
  41. Contents of that page you requested, sir.
  42. </data1002>
  43. <datacheck>
  44. HTTP/1.1 407 Authorization Required swsclose
  45. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  46. Proxy-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
  47. Proxy-Authenticate: Basic realm="gimme all yer s3cr3ts"
  48. Proxy-Authenticate: NTLM
  49. Content-Type: text/html; charset=iso-8859-1
  50. Connection: close
  51. HTTP/1.1 407 Authorization Required to proxy me my dear
  52. Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  53. Content-Length: 34
  54. HTTP/1.1 200 Things are fine in proxy land swsclose
  55. Server: Microsoft-IIS/5.0
  56. Content-Type: text/html; charset=iso-8859-1
  57. Content-Length: 42
  58. Contents of that page you requested, sir.
  59. </datacheck>
  60. </reply>
  61. # Client-side
  62. <client>
  63. <server>
  64. http
  65. </server>
  66. # tool to use
  67. <tool>
  68. lib555
  69. </tool>
  70. <features>
  71. NTLM
  72. </features>
  73. <name>
  74. HTTP proxy auth NTLM with POST data from read callback multi-if
  75. </name>
  76. <setenv>
  77. # we force our own host name, in order to make the test machine independent
  78. CURL_GETHOSTNAME=curlhost
  79. # we try to use the LD_PRELOAD hack, if not a debug build
  80. LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  81. </setenv>
  82. <command>
  83. http://test.remote.example.com/path/555 http://%HOSTIP:%HTTPPORT s1lly:pers0n
  84. </command>
  85. <precheck>
  86. chkhostname curlhost
  87. </precheck>
  88. </client>
  89. # Verify data after the test has been "shot"
  90. <verify>
  91. <strip>
  92. ^User-Agent: curl/.*
  93. </strip>
  94. <strippart>
  95. # remove CR that CURLOPT_TRANSFERTEXT added, when CharConv enabled:
  96. s/^(this is the blurb we want to upload)\r\n/$1\n/ if($has_charconv)
  97. </strippart>
  98. <protocol>
  99. POST http://test.remote.example.com/path/555 HTTP/1.1
  100. 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
  101. Host: test.remote.example.com
  102. Accept: */*
  103. Proxy-Connection: Keep-Alive
  104. Content-Length: 36
  105. Content-Type: application/x-www-form-urlencoded
  106. this is the blurb we want to upload
  107. POST http://test.remote.example.com/path/555 HTTP/1.1
  108. Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  109. 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
  110. Host: test.remote.example.com
  111. Accept: */*
  112. Proxy-Connection: Keep-Alive
  113. Content-Length: 0
  114. Content-Type: application/x-www-form-urlencoded
  115. POST http://test.remote.example.com/path/555 HTTP/1.1
  116. Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAIYrD1xJmhNBNL9fLzuk9PV9436GAxPu0EKWzqQ/sZDVLXnp1JrySgl8A+cibE6z4HMxbGx5Y3VybGhvc3Q=
  117. 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
  118. Host: test.remote.example.com
  119. Accept: */*
  120. Proxy-Connection: Keep-Alive
  121. Content-Length: 36
  122. Content-Type: application/x-www-form-urlencoded
  123. this is the blurb we want to upload
  124. </protocol>
  125. </verify>
  126. </testcase>