2
0

test169 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP proxy
  7. HTTP proxy NTLM auth
  8. HTTP Digest auth
  9. </keywords>
  10. </info>
  11. # Server-side
  12. <reply>
  13. # this is returned first since we get no proxy-auth
  14. <data>
  15. HTTP/1.1 407 Authorization Required to proxy me my dear swsclose
  16. Proxy-Authenticate: NTLM
  17. And you should ignore this data.
  18. </data>
  19. # then this is returned since we get no server-auth
  20. <data1000>
  21. HTTP/1.1 200 Authorizated fine
  22. Content-Length: 27
  23. Welcome to the end station
  24. </data1000>
  25. <data1001>
  26. HTTP/1.1 407 NTLM type-1 received sending back type-2
  27. Server: Microsoft-IIS/5.0
  28. Content-Length: 34
  29. Content-Type: text/html; charset=iso-8859-1
  30. Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  31. This is not the real page either!
  32. </data1001>
  33. # This is supposed to be returned when the server gets the second
  34. # Authorization: NTLM line passed-in from the client
  35. <data1002>
  36. HTTP/1.1 401 You now need to authenticate with the host
  37. Server: Microsoft-IIS/5.0
  38. WWW-Authenticate: Digest realm="r e a l m", nonce="abcdef"
  39. Content-Length: 46
  40. Content-Type: text/html; charset=iso-8859-1
  41. We have not authenticated with the server yet
  42. </data1002>
  43. <datacheck>
  44. HTTP/1.1 407 NTLM type-1 received sending back type-2
  45. Server: Microsoft-IIS/5.0
  46. Content-Length: 34
  47. Content-Type: text/html; charset=iso-8859-1
  48. Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  49. HTTP/1.1 401 You now need to authenticate with the host
  50. Server: Microsoft-IIS/5.0
  51. WWW-Authenticate: Digest realm="r e a l m", nonce="abcdef"
  52. Content-Length: 46
  53. Content-Type: text/html; charset=iso-8859-1
  54. HTTP/1.1 200 Authorizated fine
  55. Content-Length: 27
  56. Welcome to the end station
  57. </datacheck>
  58. </reply>
  59. # Client-side
  60. <client>
  61. <server>
  62. http
  63. </server>
  64. <features>
  65. NTLM
  66. </features>
  67. <name>
  68. HTTP with proxy-requiring-NTLM to site-requiring-Digest
  69. </name>
  70. <setenv>
  71. # we force our own host name, in order to make the test machine independent
  72. CURL_GETHOSTNAME=curlhost
  73. # we try to use the LD_PRELOAD hack, if not a debug build
  74. LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  75. </setenv>
  76. <command>
  77. http://data.from.server.requiring.digest.hohoho.com/169 --proxy http://%HOSTIP:%HTTPPORT --proxy-user foo:bar --proxy-ntlm --digest --user digest:alot
  78. </command>
  79. <precheck>
  80. chkhostname curlhost
  81. </precheck>
  82. </client>
  83. # Verify data after the test has been "shot"
  84. <verify>
  85. <strip>
  86. ^User-Agent: curl/.*
  87. </strip>
  88. <protocol>
  89. GET http://data.from.server.requiring.digest.hohoho.com/169 HTTP/1.1
  90. Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  91. User-Agent: curl/7.12.0-CVS (i686-pc-linux-gnu) libcurl/7.12.0-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.3
  92. Host: data.from.server.requiring.digest.hohoho.com
  93. Accept: */*
  94. Proxy-Connection: Keep-Alive
  95. GET http://data.from.server.requiring.digest.hohoho.com/169 HTTP/1.1
  96. Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAAAwADAHAAAAAIAAgAcwAAAAAAAAAAAAAABoKBAIP6B+XVQ6vQsx3DfDXUVhd9436GAxPu0IYcl2Z7LxHmNeOAWQ+vxUmhuCFJBUgXCWZvb2N1cmxob3N0
  97. User-Agent: curl/7.12.0-CVS (i686-pc-linux-gnu) libcurl/7.12.0-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.3
  98. Host: data.from.server.requiring.digest.hohoho.com
  99. Accept: */*
  100. Proxy-Connection: Keep-Alive
  101. GET http://data.from.server.requiring.digest.hohoho.com/169 HTTP/1.1
  102. Authorization: Digest username="digest", realm="r e a l m", nonce="abcdef", uri="/169", response="95d48591985a03c4b49cb962aa7bd3e6"
  103. User-Agent: curl/7.12.0-CVS (i686-pc-linux-gnu) libcurl/7.12.0-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.3
  104. Host: data.from.server.requiring.digest.hohoho.com
  105. Accept: */*
  106. Proxy-Connection: Keep-Alive
  107. </protocol>
  108. </verify>
  109. </testcase>