诸暨麻将添加redis
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

147 lines
3.1 KiB

  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP Basic auth
  7. HTTP NTLM auth
  8. </keywords>
  9. </info>
  10. # Server-side
  11. <reply>
  12. <!-- Basic auth -->
  13. <data100>
  14. HTTP/1.1 401 Need Basic or NTLM auth
  15. Server: Microsoft-IIS/5.0
  16. Content-Type: text/html; charset=iso-8859-1
  17. Content-Length: 29
  18. WWW-Authenticate: NTLM
  19. WWW-Authenticate: Basic realm="testrealm"
  20. This is a bad password page!
  21. </data100>
  22. <!-- NTML auth -->
  23. <data200>
  24. HTTP/1.1 401 Need Basic or NTLM auth (2)
  25. Server: Microsoft-IIS/5.0
  26. Content-Type: text/html; charset=iso-8859-1
  27. Content-Length: 27
  28. WWW-Authenticate: NTLM
  29. WWW-Authenticate: Basic realm="testrealm"
  30. This is not the real page!
  31. </data200>
  32. <data1201>
  33. HTTP/1.1 401 NTLM intermediate (2)
  34. Server: Microsoft-IIS/5.0
  35. Content-Type: text/html; charset=iso-8859-1
  36. Content-Length: 33
  37. WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
  38. This is still not the real page!
  39. </data1201>
  40. <data1202>
  41. HTTP/1.1 200 Things are fine in server land
  42. Server: Microsoft-IIS/5.0
  43. Content-Type: text/html; charset=iso-8859-1
  44. Content-Length: 32
  45. Finally, this is the real page!
  46. </data1202>
  47. <datacheck>
  48. HTTP/1.1 401 Need Basic or NTLM auth
  49. Server: Microsoft-IIS/5.0
  50. Content-Type: text/html; charset=iso-8859-1
  51. Content-Length: 29
  52. WWW-Authenticate: NTLM
  53. WWW-Authenticate: Basic realm="testrealm"
  54. This is a bad password page!
  55. HTTP/1.1 401 Need Basic or NTLM auth
  56. Server: Microsoft-IIS/5.0
  57. Content-Type: text/html; charset=iso-8859-1
  58. Content-Length: 29
  59. WWW-Authenticate: NTLM
  60. WWW-Authenticate: Basic realm="testrealm"
  61. This is a bad password page!
  62. HTTP/1.1 401 NTLM intermediate (2)
  63. Server: Microsoft-IIS/5.0
  64. Content-Type: text/html; charset=iso-8859-1
  65. Content-Length: 33
  66. WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
  67. HTTP/1.1 200 Things are fine in server land
  68. Server: Microsoft-IIS/5.0
  69. Content-Type: text/html; charset=iso-8859-1
  70. Content-Length: 32
  71. Finally, this is the real page!
  72. </datacheck>
  73. </reply>
  74. # Client-side
  75. <client>
  76. <features>
  77. NTLM
  78. </features>
  79. <server>
  80. http
  81. </server>
  82. <tool>
  83. libntlmconnect
  84. </tool>
  85. <name>
  86. NTLM connection mapping
  87. </name>
  88. <setenv>
  89. # we force our own host name, in order to make the test machine independent
  90. CURL_GETHOSTNAME=curlhost
  91. # we try to use the LD_PRELOAD hack, if not a debug build
  92. LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  93. </setenv>
  94. <command>
  95. http://%HOSTIP:%HTTPPORT/2032
  96. </command>
  97. <precheck>
  98. chkhostname curlhost
  99. </precheck>
  100. </client>
  101. # Verify data after the test has been "shot"
  102. <verify>
  103. <strip>
  104. ^User-Agent:.*
  105. </strip>
  106. <protocol>
  107. GET /20320100 HTTP/1.1
  108. Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
  109. Host: 127.0.0.1:8990
  110. Accept: */*
  111. GET /20320100 HTTP/1.1
  112. Authorization: Basic dGVzdHVzZXI6dGVzdHBhc3M=
  113. Host: 127.0.0.1:8990
  114. Accept: */*
  115. GET /20320200 HTTP/1.1
  116. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  117. Host: 127.0.0.1:8990
  118. Accept: */*
  119. GET /20320200 HTTP/1.1
  120. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=
  121. Host: 127.0.0.1:8990
  122. Accept: */*
  123. </protocol>
  124. </verify>
  125. </testcase>