[Modify] Add it

This commit is contained in:
sta 2021-05-10 21:45:24 +09:00
parent 79300881ae
commit 8aeb142198

View File

@ -252,6 +252,18 @@ namespace WebSocketSharp.Net
return _listener.RegisterContext (this);
}
internal void SendAuthenticationChallenge (
AuthenticationSchemes scheme, string realm
)
{
var chal = new AuthenticationChallenge (scheme, realm).ToString ();
_response.StatusCode = 401;
_response.Headers.InternalSet ("WWW-Authenticate", chal, true);
_response.Close ();
}
internal void SendError ()
{
try {