test547 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP POST
  6. POST callback
  7. HTTP proxy
  8. HTTP proxy NTLM auth
  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. # tool to use
  63. <tool>
  64. lib547
  65. </tool>
  66. <features>
  67. NTLM
  68. !SSPI
  69. debug
  70. </features>
  71. <name>
  72. HTTP proxy auth NTLM with POST data from read callback
  73. </name>
  74. <setenv>
  75. # we force our own host name, in order to make the test machine independent
  76. CURL_GETHOSTNAME=curlhost
  77. # we try to use the LD_PRELOAD hack, if not a debug build
  78. LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  79. </setenv>
  80. <command>
  81. http://test.remote.example.com/path/547 http://%HOSTIP:%HTTPPORT testuser:testpass
  82. </command>
  83. <precheck>
  84. chkhostname curlhost
  85. </precheck>
  86. </client>
  87. # Verify data after the test has been "shot"
  88. <verify>
  89. <strip>
  90. ^User-Agent: curl/.*
  91. </strip>
  92. <protocol>
  93. POST http://test.remote.example.com/path/547 HTTP/1.1
  94. 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
  95. Host: test.remote.example.com
  96. Accept: */*
  97. Proxy-Connection: Keep-Alive
  98. Content-Length: 36
  99. Content-Type: application/x-www-form-urlencoded
  100. this is the blurb we want to upload
  101. POST http://test.remote.example.com/path/547 HTTP/1.1
  102. Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  103. 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
  104. Host: test.remote.example.com
  105. Accept: */*
  106. Proxy-Connection: Keep-Alive
  107. Content-Length: 0
  108. Content-Type: application/x-www-form-urlencoded
  109. POST http://test.remote.example.com/path/547 HTTP/1.1
  110. Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
  111. 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
  112. Host: test.remote.example.com
  113. Accept: */*
  114. Proxy-Connection: Keep-Alive
  115. Content-Length: 36
  116. Content-Type: application/x-www-form-urlencoded
  117. this is the blurb we want to upload
  118. </protocol>
  119. </verify>
  120. </testcase>