Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
commit
5cd38d680a
|
@ -1912,6 +1912,12 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
m_rpcHandlers.Remove(method);
|
m_rpcHandlers.Remove(method);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void RemoveJsonRPCHandler(string method)
|
||||||
|
{
|
||||||
|
lock(jsonRpcHandlers)
|
||||||
|
jsonRpcHandlers.Remove(method);
|
||||||
|
}
|
||||||
|
|
||||||
public bool RemoveLLSDHandler(string path, LLSDMethod handler)
|
public bool RemoveLLSDHandler(string path, LLSDMethod handler)
|
||||||
{
|
{
|
||||||
lock (m_llsdHandlers)
|
lock (m_llsdHandlers)
|
||||||
|
|
|
@ -141,6 +141,8 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
|
|
||||||
void RemoveXmlRPCHandler(string method);
|
void RemoveXmlRPCHandler(string method);
|
||||||
|
|
||||||
|
void RemoveJsonRPCHandler(string method);
|
||||||
|
|
||||||
string GetHTTP404(string host);
|
string GetHTTP404(string host);
|
||||||
|
|
||||||
string GetHTTP500();
|
string GetHTTP500();
|
||||||
|
|
|
@ -108,6 +108,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
private int _bufferLength;
|
private int _bufferLength;
|
||||||
private bool _closing;
|
private bool _closing;
|
||||||
private bool _upgraded;
|
private bool _upgraded;
|
||||||
|
private int _maxPayloadBytes = 41943040;
|
||||||
|
|
||||||
private const string HandshakeAcceptText =
|
private const string HandshakeAcceptText =
|
||||||
"HTTP/1.1 101 Switching Protocols\r\n" +
|
"HTTP/1.1 101 Switching Protocols\r\n" +
|
||||||
|
@ -195,6 +196,15 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
HandshakeAndUpgrade();
|
HandshakeAndUpgrade();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Max Payload Size in bytes. Defaults to 40MB, but could be set upon connection before calling handshake and upgrade.
|
||||||
|
/// </summary>
|
||||||
|
public int MaxPayloadSize
|
||||||
|
{
|
||||||
|
get { return _maxPayloadBytes; }
|
||||||
|
set { _maxPayloadBytes = value; }
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This triggers the websocket start the upgrade process
|
/// This triggers the websocket start the upgrade process
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -367,7 +377,12 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
if (headerread)
|
if (headerread)
|
||||||
{
|
{
|
||||||
_socketState.FrameComplete = false;
|
_socketState.FrameComplete = false;
|
||||||
|
if (pheader.PayloadLen > (ulong) _maxPayloadBytes)
|
||||||
|
{
|
||||||
|
Close("Invalid Payload size");
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (pheader.PayloadLen > 0)
|
if (pheader.PayloadLen > 0)
|
||||||
{
|
{
|
||||||
if ((int) pheader.PayloadLen > _bufferPosition - offset)
|
if ((int) pheader.PayloadLen > _bufferPosition - offset)
|
||||||
|
|
|
@ -790,6 +790,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
handshake.RegionInfo3.ColoName = Utils.EmptyBytes;
|
handshake.RegionInfo3.ColoName = Utils.EmptyBytes;
|
||||||
handshake.RegionInfo3.ProductName = Util.StringToBytes256(regionInfo.RegionType);
|
handshake.RegionInfo3.ProductName = Util.StringToBytes256(regionInfo.RegionType);
|
||||||
handshake.RegionInfo3.ProductSKU = Utils.EmptyBytes;
|
handshake.RegionInfo3.ProductSKU = Utils.EmptyBytes;
|
||||||
|
handshake.RegionInfo4 = new RegionHandshakePacket.RegionInfo4Block[0];
|
||||||
|
|
||||||
OutPacket(handshake, ThrottleOutPacketType.Task);
|
OutPacket(handshake, ThrottleOutPacketType.Task);
|
||||||
}
|
}
|
||||||
|
@ -3571,6 +3572,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
avp.Sender.IsTrial = false;
|
avp.Sender.IsTrial = false;
|
||||||
avp.Sender.ID = agentID;
|
avp.Sender.ID = agentID;
|
||||||
|
avp.AppearanceData = new AvatarAppearancePacket.AppearanceDataBlock[0];
|
||||||
//m_log.DebugFormat("[CLIENT]: Sending appearance for {0} to {1}", agentID.ToString(), AgentId.ToString());
|
//m_log.DebugFormat("[CLIENT]: Sending appearance for {0} to {1}", agentID.ToString(), AgentId.ToString());
|
||||||
OutPacket(avp, ThrottleOutPacketType.Task);
|
OutPacket(avp, ThrottleOutPacketType.Task);
|
||||||
}
|
}
|
||||||
|
@ -4192,7 +4194,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
pack.Stat = stats.StatsBlock;
|
pack.Stat = stats.StatsBlock;
|
||||||
|
|
||||||
pack.Header.Reliable = false;
|
pack.Header.Reliable = false;
|
||||||
|
pack.RegionInfo = new SimStatsPacket.RegionInfoBlock[0];
|
||||||
OutPacket(pack, ThrottleOutPacketType.Task);
|
OutPacket(pack, ThrottleOutPacketType.Task);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue