aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-03-05 23:52:52 +0000
committerJustin Clark-Casey (justincc)2013-03-05 23:52:52 +0000
commit5cd38d680a5a6a139d2b61e937213370c5dd3789 (patch)
treed5a1e77b3b76621cb9a822b169a32a13635844cc
parentGet attachment script state before taking sp.AttachmentsSyncLock() to avoid r... (diff)
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-5cd38d680a5a6a139d2b61e937213370c5dd3789.zip
opensim-SC_OLD-5cd38d680a5a6a139d2b61e937213370c5dd3789.tar.gz
opensim-SC_OLD-5cd38d680a5a6a139d2b61e937213370c5dd3789.tar.bz2
opensim-SC_OLD-5cd38d680a5a6a139d2b61e937213370c5dd3789.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs6
-rw-r--r--OpenSim/Framework/Servers/HttpServer/Interfaces/IHttpServer.cs2
-rw-r--r--OpenSim/Framework/Servers/HttpServer/WebsocketServerHandler.cs17
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs6
-rwxr-xr-xbin/OpenMetaverse.StructuredData.dllbin102400 -> 114688 bytes
-rwxr-xr-xbin/OpenMetaverse.dllbin1765376 -> 1925120 bytes
-rwxr-xr-xbin/OpenMetaverseTypes.dllbin114688 -> 122880 bytes
7 files changed, 28 insertions, 3 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index 70c531c..58312ab 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -1912,6 +1912,12 @@ namespace OpenSim.Framework.Servers.HttpServer
1912 m_rpcHandlers.Remove(method); 1912 m_rpcHandlers.Remove(method);
1913 } 1913 }
1914 1914
1915 public void RemoveJsonRPCHandler(string method)
1916 {
1917 lock(jsonRpcHandlers)
1918 jsonRpcHandlers.Remove(method);
1919 }
1920
1915 public bool RemoveLLSDHandler(string path, LLSDMethod handler) 1921 public bool RemoveLLSDHandler(string path, LLSDMethod handler)
1916 { 1922 {
1917 lock (m_llsdHandlers) 1923 lock (m_llsdHandlers)
diff --git a/OpenSim/Framework/Servers/HttpServer/Interfaces/IHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/Interfaces/IHttpServer.cs
index 71ca3ff..d162bc1 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
140 void RemoveStreamHandler(string httpMethod, string path); 140 void RemoveStreamHandler(string httpMethod, string path);
141 141
142 void RemoveXmlRPCHandler(string method); 142 void RemoveXmlRPCHandler(string method);
143
144 void RemoveJsonRPCHandler(string method);
143 145
144 string GetHTTP404(string host); 146 string GetHTTP404(string host);
145 147
diff --git a/OpenSim/Framework/Servers/HttpServer/WebsocketServerHandler.cs b/OpenSim/Framework/Servers/HttpServer/WebsocketServerHandler.cs
index bb8825b..ee96b47 100644
--- a/OpenSim/Framework/Servers/HttpServer/WebsocketServerHandler.cs
+++ b/OpenSim/Framework/Servers/HttpServer/WebsocketServerHandler.cs
@@ -108,6 +108,7 @@ namespace OpenSim.Framework.Servers.HttpServer
108 private int _bufferLength; 108 private int _bufferLength;
109 private bool _closing; 109 private bool _closing;
110 private bool _upgraded; 110 private bool _upgraded;
111 private int _maxPayloadBytes = 41943040;
111 112
112 private const string HandshakeAcceptText = 113 private const string HandshakeAcceptText =
113 "HTTP/1.1 101 Switching Protocols\r\n" + 114 "HTTP/1.1 101 Switching Protocols\r\n" +
@@ -196,6 +197,15 @@ namespace OpenSim.Framework.Servers.HttpServer
196 } 197 }
197 198
198 /// <summary> 199 /// <summary>
200 /// Max Payload Size in bytes. Defaults to 40MB, but could be set upon connection before calling handshake and upgrade.
201 /// </summary>
202 public int MaxPayloadSize
203 {
204 get { return _maxPayloadBytes; }
205 set { _maxPayloadBytes = value; }
206 }
207
208 /// <summary>
199 /// This triggers the websocket start the upgrade process 209 /// This triggers the websocket start the upgrade process
200 /// </summary> 210 /// </summary>
201 public void HandshakeAndUpgrade() 211 public void HandshakeAndUpgrade()
@@ -367,7 +377,12 @@ namespace OpenSim.Framework.Servers.HttpServer
367 if (headerread) 377 if (headerread)
368 { 378 {
369 _socketState.FrameComplete = false; 379 _socketState.FrameComplete = false;
370 380 if (pheader.PayloadLen > (ulong) _maxPayloadBytes)
381 {
382 Close("Invalid Payload size");
383
384 return;
385 }
371 if (pheader.PayloadLen > 0) 386 if (pheader.PayloadLen > 0)
372 { 387 {
373 if ((int) pheader.PayloadLen > _bufferPosition - offset) 388 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 5675870..6742d99 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
790 handshake.RegionInfo3.ColoName = Utils.EmptyBytes; 790 handshake.RegionInfo3.ColoName = Utils.EmptyBytes;
791 handshake.RegionInfo3.ProductName = Util.StringToBytes256(regionInfo.RegionType); 791 handshake.RegionInfo3.ProductName = Util.StringToBytes256(regionInfo.RegionType);
792 handshake.RegionInfo3.ProductSKU = Utils.EmptyBytes; 792 handshake.RegionInfo3.ProductSKU = Utils.EmptyBytes;
793 793 handshake.RegionInfo4 = new RegionHandshakePacket.RegionInfo4Block[0];
794
794 OutPacket(handshake, ThrottleOutPacketType.Task); 795 OutPacket(handshake, ThrottleOutPacketType.Task);
795 } 796 }
796 797
@@ -3571,6 +3572,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3571 3572
3572 avp.Sender.IsTrial = false; 3573 avp.Sender.IsTrial = false;
3573 avp.Sender.ID = agentID; 3574 avp.Sender.ID = agentID;
3575 avp.AppearanceData = new AvatarAppearancePacket.AppearanceDataBlock[0];
3574 //m_log.DebugFormat("[CLIENT]: Sending appearance for {0} to {1}", agentID.ToString(), AgentId.ToString()); 3576 //m_log.DebugFormat("[CLIENT]: Sending appearance for {0} to {1}", agentID.ToString(), AgentId.ToString());
3575 OutPacket(avp, ThrottleOutPacketType.Task); 3577 OutPacket(avp, ThrottleOutPacketType.Task);
3576 } 3578 }
@@ -4192,7 +4194,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4192 pack.Stat = stats.StatsBlock; 4194 pack.Stat = stats.StatsBlock;
4193 4195
4194 pack.Header.Reliable = false; 4196 pack.Header.Reliable = false;
4195 4197 pack.RegionInfo = new SimStatsPacket.RegionInfoBlock[0];
4196 OutPacket(pack, ThrottleOutPacketType.Task); 4198 OutPacket(pack, ThrottleOutPacketType.Task);
4197 } 4199 }
4198 4200
diff --git a/bin/OpenMetaverse.StructuredData.dll b/bin/OpenMetaverse.StructuredData.dll
index 5c0b3c6..c7216ce 100755
--- a/bin/OpenMetaverse.StructuredData.dll
+++ b/bin/OpenMetaverse.StructuredData.dll
Binary files differ
diff --git a/bin/OpenMetaverse.dll b/bin/OpenMetaverse.dll
index 511096e..3e210ba 100755
--- a/bin/OpenMetaverse.dll
+++ b/bin/OpenMetaverse.dll
Binary files differ
diff --git a/bin/OpenMetaverseTypes.dll b/bin/OpenMetaverseTypes.dll
index 8bc8885..6cc4c5a 100755
--- a/bin/OpenMetaverseTypes.dll
+++ b/bin/OpenMetaverseTypes.dll
Binary files differ