test155 3.4 KB

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