mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 09:16:28 +08:00
cosmetics
This commit is contained in:
@@ -242,13 +242,13 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
|
||||
if (string.IsNullOrEmpty(_request.Headers["upgrade"]))
|
||||
{
|
||||
FailUpgrade(OSHttpStatusCode.ClientErrorBadRequest, "no upgrade request submitted");
|
||||
FailUpgrade(HttpStatusCode.BadRequest, "no upgrade request submitted");
|
||||
}
|
||||
|
||||
string connectionheader = _request.Headers["upgrade"];
|
||||
if (connectionheader.ToLower() != "websocket")
|
||||
{
|
||||
FailUpgrade(OSHttpStatusCode.ClientErrorBadRequest, "no connection upgrade request submitted");
|
||||
FailUpgrade(HttpStatusCode.BadRequest, "no connection upgrade request submitted");
|
||||
}
|
||||
|
||||
// If the object consumer provided a method to validate the origin, we should call it and give the client a success or fail.
|
||||
@@ -266,7 +266,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
}
|
||||
else
|
||||
{
|
||||
FailUpgrade(OSHttpStatusCode.ClientErrorForbidden, "Origin Validation Failed");
|
||||
FailUpgrade(HttpStatusCode.Forbidden, "Origin Validation Failed");
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -353,7 +353,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
/// </summary>
|
||||
/// <param name="pCode">HTTP Status reflecting the reason why</param>
|
||||
/// <param name="pMessage">Textual reason for the upgrade fail</param>
|
||||
private void FailUpgrade(OSHttpStatusCode pCode, string pMessage )
|
||||
private void FailUpgrade(HttpStatusCode pCode, string pMessage )
|
||||
{
|
||||
string handshakeResponse = string.Format(HandshakeDeclineText, (int)pCode, pMessage.Replace("\n", string.Empty).Replace("\r", string.Empty));
|
||||
byte[] bhandshakeResponse = Encoding.UTF8.GetBytes(handshakeResponse);
|
||||
|
||||
Reference in New Issue
Block a user