test239 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP POST
  6. HTTP proxy
  7. HTTP proxy NTLM auth
  8. </keywords>
  9. </info>
  10. # Server-side
  11. <reply>
  12. # this is returned first since we get no proxy-auth
  13. <data1001>
  14. HTTP/1.1 407 Authorization Required to proxy me my dear
  15. Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  16. Content-Length: 34
  17. Hey you, authenticate or go away!
  18. </data1001>
  19. # This is supposed to be returned when the server gets the second
  20. # Authorization: NTLM line passed-in from the client
  21. <data1002>
  22. HTTP/1.1 200 Things are fine in proxy land swsclose
  23. Server: Microsoft-IIS/5.0
  24. Content-Type: text/html; charset=iso-8859-1
  25. Content-Length: 42
  26. Contents of that page you requested, sir.
  27. </data1002>
  28. <datacheck>
  29. HTTP/1.1 407 Authorization Required to proxy me my dear
  30. Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  31. Content-Length: 34
  32. HTTP/1.1 200 Things are fine in proxy land swsclose
  33. Server: Microsoft-IIS/5.0
  34. Content-Type: text/html; charset=iso-8859-1
  35. Content-Length: 42
  36. Contents of that page you requested, sir.
  37. </datacheck>
  38. </reply>
  39. # Client-side
  40. <client>
  41. <server>
  42. http
  43. </server>
  44. <features>
  45. NTLM
  46. !SSPI
  47. debug
  48. </features>
  49. <name>
  50. HTTP proxy-auth NTLM and then POST
  51. </name>
  52. <setenv>
  53. # we force our own host name, in order to make the test machine independent
  54. CURL_GETHOSTNAME=curlhost
  55. # we try to use the LD_PRELOAD hack, if not a debug build
  56. LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  57. </setenv>
  58. <command>
  59. http://%HOSTIP:%HTTPPORT/239 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm -d "postit"
  60. </command>
  61. <precheck>
  62. chkhostname curlhost
  63. </precheck>
  64. </client>
  65. # Verify data after the test has been "shot"
  66. <verify>
  67. <strip>
  68. ^User-Agent: curl/.*
  69. </strip>
  70. <protocol nonewline="yes">
  71. POST http://%HOSTIP:%HTTPPORT/239 HTTP/1.1
  72. Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  73. 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
  74. Host: %HOSTIP:%HTTPPORT
  75. Accept: */*
  76. Proxy-Connection: Keep-Alive
  77. Content-Length: 0
  78. Content-Type: application/x-www-form-urlencoded
  79. POST http://%HOSTIP:%HTTPPORT/239 HTTP/1.1
  80. Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAL9LNW5+nkyHZRmyFaL/LJ4xMjM0MjIzNGUCyhgQ9hw6eWAT13EbDa0BAQAAAAAAAACAPtXesZ0BMTIzNDIyMzQAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
  81. 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
  82. Host: %HOSTIP:%HTTPPORT
  83. Accept: */*
  84. Proxy-Connection: Keep-Alive
  85. Content-Length: 6
  86. Content-Type: application/x-www-form-urlencoded
  87. postit
  88. </protocol>
  89. </verify>
  90. </testcase>