private bool SendAuthenticationChallenge(RtspProtocol from, Variant realm)
{
//10. Ok, the user doesn't know that this needs authentication. We
//will respond back with a nice 401. Generate the line first
string wwwAuthenticate = HTTPAuthHelper.GetWWWAuthenticateHeader(
realm["method"],
realm["name"]);
//12. Save the nonce for later validation when new requests are coming in again
from.CustomParameters["wwwAuthenticate"] = wwwAuthenticate;
//13. send the response
from.PushResponseFirstLine(RTSP_VERSION_1_0, 401, "Unauthorized");
from.PushResponseHeader(HTTP_HEADERS_WWWAUTHENTICATE, wwwAuthenticate);
return from.SendResponseMessage();
}