test1100 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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 TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  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: /%TESTNUMBER
  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 TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  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: /%TESTNUMBER
  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. SSL
  55. !SSPI
  56. debug
  57. </features>
  58. <server>
  59. http
  60. </server>
  61. <name>
  62. HTTP POST with NTLM authorization and following a 302 redirect
  63. </name>
  64. <setenv>
  65. # we force our own host name, in order to make the test machine independent
  66. CURL_GETHOSTNAME=curlhost
  67. # we try to use the LD_PRELOAD hack, if not a debug build
  68. LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  69. </setenv>
  70. <command>
  71. http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --ntlm -L -d "stuff to send away"
  72. </command>
  73. <precheck>
  74. chkhostname curlhost
  75. </precheck>
  76. </client>
  77. # Verify data after the test has been "shot"
  78. <verify>
  79. POST /%TESTNUMBER HTTP/1.1
  80. Host: %HOSTIP:%HTTPPORT
  81. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  82. User-Agent: curl/%VERSION
  83. Accept: */*
  84. Content-Length: 0
  85. Content-Type: application/x-www-form-urlencoded
  86. POST /%TESTNUMBER HTTP/1.1
  87. Host: %HOSTIP:%HTTPPORT
  88. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
  89. User-Agent: curl/%VERSION
  90. Accept: */*
  91. Content-Length: 18
  92. Content-Type: application/x-www-form-urlencoded
  93. stuff to send awayGET /%TESTNUMBER HTTP/1.1
  94. Host: %HOSTIP:%HTTPPORT
  95. User-Agent: curl/%VERSION
  96. Accept: */*
  97. </verify>
  98. </testcase>