test155 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP PUT
  6. HTTP NTLM auth
  7. NTLM
  8. </keywords>
  9. </info>
  10. # Server-side
  11. <reply>
  12. <servercmd>
  13. auth_required
  14. </servercmd>
  15. <data>
  16. HTTP/1.1 401 NTLM Authorization Required swsclose
  17. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  18. WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
  19. WWW-Authenticate: Basic realm="gimme all yer s3cr3ts"
  20. WWW-Authenticate: NTLM
  21. Content-Type: text/html; charset=iso-8859-1
  22. Connection: close
  23. moo
  24. </data>
  25. # This is supposed to be returned when the server gets a first
  26. # Authorization: NTLM line passed-in from the client
  27. <data1001>
  28. HTTP/1.1 401 Type-1 received, send back type-2
  29. Server: Microsoft-IIS/5.0
  30. Content-Length: 34
  31. Content-Type: text/html; charset=iso-8859-1
  32. WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  33. This is not the real page either!
  34. </data1001>
  35. # This is supposed to be returned when the server gets the second
  36. # Authorization: NTLM line passed-in from the client
  37. <data1002>
  38. HTTP/1.1 200 Type-3 Received and all Things are fine swsclose
  39. Server: Microsoft-IIS/5.0
  40. Content-Type: text/html; charset=iso-8859-1
  41. Content-Length: 32
  42. Finally, this is the real page!
  43. </data1002>
  44. <datacheck>
  45. HTTP/1.1 401 NTLM Authorization Required swsclose
  46. Server: Apache/1.3.27 (Darwin) PHP/4.1.2
  47. WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
  48. WWW-Authenticate: Basic realm="gimme all yer s3cr3ts"
  49. WWW-Authenticate: NTLM
  50. Content-Type: text/html; charset=iso-8859-1
  51. Connection: close
  52. HTTP/1.1 401 Type-1 received, send back type-2
  53. Server: Microsoft-IIS/5.0
  54. Content-Length: 34
  55. Content-Type: text/html; charset=iso-8859-1
  56. WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  57. HTTP/1.1 200 Type-3 Received and all Things are fine swsclose
  58. Server: Microsoft-IIS/5.0
  59. Content-Type: text/html; charset=iso-8859-1
  60. Content-Length: 32
  61. Finally, this is the real page!
  62. </datacheck>
  63. </reply>
  64. # Client-side
  65. <client>
  66. <features>
  67. NTLM
  68. SSL
  69. !SSPI
  70. </features>
  71. <server>
  72. http
  73. </server>
  74. <name>
  75. HTTP PUT with --anyauth authorization (picking NTLM)
  76. </name>
  77. <command>
  78. http://%HOSTIP:%HTTPPORT/%TESTNUMBER -T log/put%TESTNUMBER -u testuser:testpass --anyauth
  79. </command>
  80. <file name="log/put%TESTNUMBER">
  81. This is data we upload with PUT
  82. a second line
  83. line three
  84. four is the number of lines
  85. </file>
  86. </client>
  87. # Verify data after the test has been "shot"
  88. <verify>
  89. <protocol>
  90. PUT /%TESTNUMBER HTTP/1.1
  91. Host: %HOSTIP:%HTTPPORT
  92. User-Agent: curl/%VERSION
  93. Accept: */*
  94. Content-Length: 85
  95. Expect: 100-continue
  96. PUT /%TESTNUMBER HTTP/1.1
  97. Host: %HOSTIP:%HTTPPORT
  98. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  99. User-Agent: curl/%VERSION
  100. Accept: */*
  101. Content-Length: 0
  102. PUT /%TESTNUMBER HTTP/1.1
  103. Host: %HOSTIP:%HTTPPORT
  104. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAALAAsAeAAAAAAAAAAAAAAAhoIBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyV09SS1NUQVRJT04=
  105. User-Agent: curl/%VERSION
  106. Accept: */*
  107. Content-Length: 85
  108. Expect: 100-continue
  109. This is data we upload with PUT
  110. a second line
  111. line three
  112. four is the number of lines
  113. </protocol>
  114. </verify>
  115. </testcase>