test555 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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 noticeable 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. !SSPI
  73. debug
  74. </features>
  75. <name>
  76. HTTP proxy auth NTLM with POST data from read callback multi-if
  77. </name>
  78. <setenv>
  79. # we force our own host name, in order to make the test machine independent
  80. CURL_GETHOSTNAME=curlhost
  81. # we try to use the LD_PRELOAD hack, if not a debug build
  82. LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  83. </setenv>
  84. <command>
  85. http://test.remote.example.com/path/555 http://%HOSTIP:%HTTPPORT testuser:testpass
  86. </command>
  87. <precheck>
  88. chkhostname curlhost
  89. </precheck>
  90. </client>
  91. # Verify data after the test has been "shot"
  92. <verify>
  93. <strip>
  94. ^User-Agent: curl/.*
  95. </strip>
  96. <protocol>
  97. POST http://test.remote.example.com/path/555 HTTP/1.1
  98. Host: test.remote.example.com
  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: 36
  103. Content-Type: application/x-www-form-urlencoded
  104. this is the blurb we want to upload
  105. POST http://test.remote.example.com/path/555 HTTP/1.1
  106. Host: test.remote.example.com
  107. Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  108. 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
  109. Accept: */*
  110. Proxy-Connection: Keep-Alive
  111. Content-Length: 0
  112. Content-Type: application/x-www-form-urlencoded
  113. POST http://test.remote.example.com/path/555 HTTP/1.1
  114. Host: test.remote.example.com
  115. Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
  116. 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
  117. Accept: */*
  118. Proxy-Connection: Keep-Alive
  119. Content-Length: 36
  120. Content-Type: application/x-www-form-urlencoded
  121. this is the blurb we want to upload
  122. </protocol>
  123. </verify>
  124. </testcase>