test547 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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. </features>
  69. <name>
  70. HTTP proxy auth NTLM with POST data from read callback
  71. </name>
  72. <setenv>
  73. # we force our own host name, in order to make the test machine independent
  74. CURL_GETHOSTNAME=curlhost
  75. # we try to use the LD_PRELOAD hack, if not a debug build
  76. LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  77. </setenv>
  78. <command>
  79. http://test.remote.example.com/path/547 http://%HOSTIP:%HTTPPORT s1lly:pers0n
  80. </command>
  81. <precheck>
  82. chkhostname curlhost
  83. </precheck>
  84. </client>
  85. # Verify data after the test has been "shot"
  86. <verify>
  87. <strip>
  88. ^User-Agent: curl/.*
  89. </strip>
  90. <protocol>
  91. POST http://test.remote.example.com/path/547 HTTP/1.1
  92. 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
  93. Host: test.remote.example.com
  94. Accept: */*
  95. Proxy-Connection: Keep-Alive
  96. Content-Length: 36
  97. Content-Type: application/x-www-form-urlencoded
  98. this is the blurb we want to upload
  99. POST http://test.remote.example.com/path/547 HTTP/1.1
  100. Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  101. 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
  102. Host: test.remote.example.com
  103. Accept: */*
  104. Proxy-Connection: Keep-Alive
  105. Content-Length: 0
  106. Content-Type: application/x-www-form-urlencoded
  107. POST http://test.remote.example.com/path/547 HTTP/1.1
  108. Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAIYrD1xJmhNBNL9fLzuk9PV9436GAxPu0EKWzqQ/sZDVLXnp1JrySgl8A+cibE6z4HMxbGx5Y3VybGhvc3Q=
  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: 36
  114. Content-Type: application/x-www-form-urlencoded
  115. this is the blurb we want to upload
  116. </protocol>
  117. </verify>
  118. </testcase>