test1418 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP NTLM auth
  7. connection re-use
  8. </keywords>
  9. </info>
  10. # Server-side
  11. <reply>
  12. <servercmd>
  13. connection-monitor
  14. </servercmd>
  15. <data>
  16. HTTP/1.1 401 Authentication please!
  17. Content-Length: 20
  18. WWW-Authenticate: Digest realm="loonie", nonce="314156592"
  19. WWW-Authenticate: Basic
  20. Please auth with me
  21. </data>
  22. <data3>
  23. HTTP/1.1 401 Authentication please!
  24. Content-Length: 20
  25. WWW-Authenticate: Digest realm="loonie", nonce="314156592"
  26. WWW-Authenticate: Basic
  27. Please auth with me
  28. </data3>
  29. # This is supposed to be returned when the server gets the second
  30. # Authorization: NTLM line passed-in from the client
  31. <data1000>
  32. HTTP/1.1 200 Things are fine in server land
  33. Server: Microsoft-IIS/5.0
  34. Content-Length: 4
  35. moo
  36. </data1000>
  37. <data1003>
  38. HTTP/1.1 200 OK
  39. Server: Another one/1.0
  40. Content-Length: 4
  41. boo
  42. </data1003>
  43. # This is the first reply after the redirection
  44. <data1011>
  45. HTTP/1.1 200 OK
  46. Server: Microsoft-IIS/5.0
  47. Content-Type: text/html; charset=iso-8859-1
  48. Content-Length: 34
  49. This is not the real page either!
  50. </data1011>
  51. <datacheck>
  52. HTTP/1.1 401 Authentication please!
  53. Content-Length: 20
  54. WWW-Authenticate: Digest realm="loonie", nonce="314156592"
  55. WWW-Authenticate: Basic
  56. HTTP/1.1 200 Things are fine in server land
  57. Server: Microsoft-IIS/5.0
  58. Content-Length: 4
  59. moo
  60. </datacheck>
  61. </reply>
  62. # Client-side
  63. <client>
  64. <server>
  65. http
  66. </server>
  67. <features>
  68. !SSPI
  69. crypto
  70. </features>
  71. <name>
  72. HTTP with --anyauth and connection re-use
  73. </name>
  74. <command>
  75. http://%HOSTIP:%HTTPPORT/%TESTNUMBER -u testuser:testpass --anyauth http://%HOSTIP:%HTTPPORT/%TESTNUMBER0003
  76. </command>
  77. </client>
  78. # Verify data after the test has been "shot"
  79. <verify>
  80. <protocol>
  81. GET /%TESTNUMBER HTTP/1.1
  82. Host: %HOSTIP:%HTTPPORT
  83. User-Agent: curl/%VERSION
  84. Accept: */*
  85. GET /%TESTNUMBER HTTP/1.1
  86. Host: %HOSTIP:%HTTPPORT
  87. Authorization: Digest username="testuser", realm="loonie", nonce="314156592", uri="/%TESTNUMBER", response="986238b7e0077754944c966f56d9bc77"
  88. User-Agent: curl/%VERSION
  89. Accept: */*
  90. GET /%TESTNUMBER0003 HTTP/1.1
  91. Host: %HOSTIP:%HTTPPORT
  92. User-Agent: curl/%VERSION
  93. Accept: */*
  94. GET /%TESTNUMBER0003 HTTP/1.1
  95. Host: %HOSTIP:%HTTPPORT
  96. Authorization: Digest username="testuser", realm="loonie", nonce="314156592", uri="/%TESTNUMBER0003", response="1c6390a67bac3283a9b023402f3b3540"
  97. User-Agent: curl/%VERSION
  98. Accept: */*
  99. [DISCONNECT]
  100. </protocol>
  101. </verify>
  102. </testcase>