diff --git a/OpenSim/Framework/Capabilities/Caps.cs b/OpenSim/Framework/Capabilities/Caps.cs index 5937ae6e8c..dbb07817f6 100644 --- a/OpenSim/Framework/Capabilities/Caps.cs +++ b/OpenSim/Framework/Capabilities/Caps.cs @@ -1344,7 +1344,11 @@ namespace OpenSim.Framework.Capabilities /// public string uploaderCaps(byte[] data, string path, string param) { - m_log.WarnFormat("[CAPS] baked texture upload completed for {0}",newAssetID); + handlerUpLoad = OnUpLoad; + if (handlerUpLoad != null) + { + Util.FireAndForget(delegate(object o) { handlerUpLoad(newAssetID, data); }); + } string res = String.Empty; LLSDAssetUploadComplete uploadComplete = new LLSDAssetUploadComplete(); @@ -1356,12 +1360,6 @@ namespace OpenSim.Framework.Capabilities httpListener.RemoveStreamHandler("POST", uploaderPath); - handlerUpLoad = OnUpLoad; - if (handlerUpLoad != null) - { - handlerUpLoad(newAssetID, data); - } - m_log.InfoFormat("[CAPS] baked texture upload completed for {0}",newAssetID); return res; diff --git a/OpenSim/Framework/Servers/HttpServer/BinaryStreamHandler.cs b/OpenSim/Framework/Servers/HttpServer/BinaryStreamHandler.cs index 86fa44dfea..bae4e1b997 100644 --- a/OpenSim/Framework/Servers/HttpServer/BinaryStreamHandler.cs +++ b/OpenSim/Framework/Servers/HttpServer/BinaryStreamHandler.cs @@ -53,8 +53,8 @@ namespace OpenSim.Framework.Servers.HttpServer private static byte[] ReadFully(Stream stream) { - byte[] buffer = new byte[32768]; - using (MemoryStream ms = new MemoryStream()) + byte[] buffer = new byte[1024]; + using (MemoryStream ms = new MemoryStream(1024*256)) { while (true) {