diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index 70c531c105..58312abf01 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -1912,6 +1912,12 @@ namespace OpenSim.Framework.Servers.HttpServer
m_rpcHandlers.Remove(method);
}
+ public void RemoveJsonRPCHandler(string method)
+ {
+ lock(jsonRpcHandlers)
+ jsonRpcHandlers.Remove(method);
+ }
+
public bool RemoveLLSDHandler(string path, LLSDMethod handler)
{
lock (m_llsdHandlers)
diff --git a/OpenSim/Framework/Servers/HttpServer/Interfaces/IHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/Interfaces/IHttpServer.cs
index 71ca3ff8e5..d162bc12fb 100644
--- a/OpenSim/Framework/Servers/HttpServer/Interfaces/IHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/Interfaces/IHttpServer.cs
@@ -140,6 +140,8 @@ namespace OpenSim.Framework.Servers.HttpServer
void RemoveStreamHandler(string httpMethod, string path);
void RemoveXmlRPCHandler(string method);
+
+ void RemoveJsonRPCHandler(string method);
string GetHTTP404(string host);
diff --git a/OpenSim/Framework/Servers/HttpServer/WebsocketServerHandler.cs b/OpenSim/Framework/Servers/HttpServer/WebsocketServerHandler.cs
index bb8825b118..ee96b47c69 100644
--- a/OpenSim/Framework/Servers/HttpServer/WebsocketServerHandler.cs
+++ b/OpenSim/Framework/Servers/HttpServer/WebsocketServerHandler.cs
@@ -108,6 +108,7 @@ namespace OpenSim.Framework.Servers.HttpServer
private int _bufferLength;
private bool _closing;
private bool _upgraded;
+ private int _maxPayloadBytes = 41943040;
private const string HandshakeAcceptText =
"HTTP/1.1 101 Switching Protocols\r\n" +
@@ -195,6 +196,15 @@ namespace OpenSim.Framework.Servers.HttpServer
HandshakeAndUpgrade();
}
+ ///
+ /// Max Payload Size in bytes. Defaults to 40MB, but could be set upon connection before calling handshake and upgrade.
+ ///
+ public int MaxPayloadSize
+ {
+ get { return _maxPayloadBytes; }
+ set { _maxPayloadBytes = value; }
+ }
+
///
/// This triggers the websocket start the upgrade process
///
@@ -367,7 +377,12 @@ namespace OpenSim.Framework.Servers.HttpServer
if (headerread)
{
_socketState.FrameComplete = false;
-
+ if (pheader.PayloadLen > (ulong) _maxPayloadBytes)
+ {
+ Close("Invalid Payload size");
+
+ return;
+ }
if (pheader.PayloadLen > 0)
{
if ((int) pheader.PayloadLen > _bufferPosition - offset)
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 5675870f83..6742d99a8f 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -790,7 +790,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
handshake.RegionInfo3.ColoName = Utils.EmptyBytes;
handshake.RegionInfo3.ProductName = Util.StringToBytes256(regionInfo.RegionType);
handshake.RegionInfo3.ProductSKU = Utils.EmptyBytes;
-
+ handshake.RegionInfo4 = new RegionHandshakePacket.RegionInfo4Block[0];
+
OutPacket(handshake, ThrottleOutPacketType.Task);
}
@@ -3571,6 +3572,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
avp.Sender.IsTrial = false;
avp.Sender.ID = agentID;
+ avp.AppearanceData = new AvatarAppearancePacket.AppearanceDataBlock[0];
//m_log.DebugFormat("[CLIENT]: Sending appearance for {0} to {1}", agentID.ToString(), AgentId.ToString());
OutPacket(avp, ThrottleOutPacketType.Task);
}
@@ -4192,7 +4194,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
pack.Stat = stats.StatsBlock;
pack.Header.Reliable = false;
-
+ pack.RegionInfo = new SimStatsPacket.RegionInfoBlock[0];
OutPacket(pack, ThrottleOutPacketType.Task);
}
diff --git a/bin/OpenMetaverse.StructuredData.dll b/bin/OpenMetaverse.StructuredData.dll
index 5c0b3c65e7..c7216ce176 100755
Binary files a/bin/OpenMetaverse.StructuredData.dll and b/bin/OpenMetaverse.StructuredData.dll differ
diff --git a/bin/OpenMetaverse.dll b/bin/OpenMetaverse.dll
index 511096e7fe..3e210ba7b3 100755
Binary files a/bin/OpenMetaverse.dll and b/bin/OpenMetaverse.dll differ
diff --git a/bin/OpenMetaverseTypes.dll b/bin/OpenMetaverseTypes.dll
index 8bc88858b1..6cc4c5acce 100755
Binary files a/bin/OpenMetaverseTypes.dll and b/bin/OpenMetaverseTypes.dll differ