test1100 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP POST
  6. HTTP NTLM auth
  7. </keywords>
  8. </info>
  9. # Server-side
  10. <reply>
  11. <data>
  12. HTTP/1.1 200 Thanks for this! swsclose
  13. Content-Length: 25
  14. This is the final page !
  15. </data>
  16. <data1001>
  17. HTTP/1.1 401 Now gimme that second request of crap
  18. Server: Microsoft-IIS/5.0
  19. Content-Type: text/html; charset=iso-8859-1
  20. Content-Length: 34
  21. WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  22. This is not the real page either!
  23. </data1001>
  24. # This is supposed to be returned when the server gets the second
  25. # Authorization: NTLM line passed-in from the client
  26. <data1002>
  27. HTTP/1.1 302 Thanks for this, but we want to redir you!
  28. Server: Microsoft-IIS/5.0
  29. Content-Type: text/html; charset=iso-8859-1
  30. Location: /1100
  31. Content-Length: 34
  32. This is not the real page either!
  33. </data1002>
  34. <datacheck>
  35. HTTP/1.1 401 Now gimme that second request of crap
  36. Server: Microsoft-IIS/5.0
  37. Content-Type: text/html; charset=iso-8859-1
  38. Content-Length: 34
  39. WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  40. HTTP/1.1 302 Thanks for this, but we want to redir you!
  41. Server: Microsoft-IIS/5.0
  42. Content-Type: text/html; charset=iso-8859-1
  43. Location: /1100
  44. Content-Length: 34
  45. HTTP/1.1 200 Thanks for this! swsclose
  46. Content-Length: 25
  47. This is the final page !
  48. </datacheck>
  49. </reply>
  50. # Client-side
  51. <client>
  52. <features>
  53. NTLM
  54. </features>
  55. <server>
  56. http
  57. </server>
  58. <name>
  59. HTTP POST with NTLM authorization and following a 302 redirect
  60. </name>
  61. <setenv>
  62. # we force our own host name, in order to make the test machine independent
  63. CURL_GETHOSTNAME=curlhost
  64. # we try to use the LD_PRELOAD hack, if not a debug build
  65. LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  66. </setenv>
  67. <command>
  68. http://%HOSTIP:%HTTPPORT/1100 -u testuser:testpass --ntlm -L -d "stuff to send away"
  69. </command>
  70. <precheck>
  71. chkhostname curlhost
  72. </precheck>
  73. </client>
  74. # Verify data after the test has been "shot"
  75. <verify>
  76. <strip>
  77. ^User-Agent:.*
  78. </strip>
  79. <protocol>
  80. POST /1100 HTTP/1.1
  81. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  82. User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
  83. Host: %HOSTIP:%HTTPPORT
  84. Accept: */*
  85. Content-Length: 0
  86. Content-Type: application/x-www-form-urlencoded
  87. POST /1100 HTTP/1.1
  88. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
  89. User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
  90. Host: %HOSTIP:%HTTPPORT
  91. Accept: */*
  92. Content-Length: 18
  93. Content-Type: application/x-www-form-urlencoded
  94. stuff to send awayGET /1100 HTTP/1.1
  95. User-Agent: curl/7.19.5-CVS (i686-pc-linux-gnu) libcurl/7.19.5-CVS GnuTLS/2.6.6 zlib/1.2.3.3 c-ares/1.6.1-CVS libidn/1.14 libssh2/1.1
  96. Host: %HOSTIP:%HTTPPORT
  97. Accept: */*
  98. </protocol>
  99. </verify>
  100. </testcase>