OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
/// <summary>
/// Called by the script task update handler.  Provides a URL to which the client can upload a new asset.
/// </summary>
/// <param name="request"></param>
/// <param name="path"></param>
/// <param name="param"></param>
/// <param name="httpRequest">HTTP request header object</param>
/// <param name="httpResponse">HTTP response header object</param>
/// <returns></returns>
Called by the script task update handler.  Provides a URL to which the client can upload a new asset.
Called by the script task update handler . Provides a URL to which the client can upload a new asset .
public string ScriptTaskInventory(string request, string path, string param,
                                          IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
        {
            try
            {
                Hashtable hash = (Hashtable)LLSD.LLSDDeserialize(Utils.StringToBytes(request));
                LLSDTaskScriptUpdate llsdUpdateRequest = new LLSDTaskScriptUpdate();
                LLSDHelpers.DeserialiseOSDMap(hash, llsdUpdateRequest);
                string capsBase = "/CAPS/" + m_HostCapsObj.CapsObjectPath;
                string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");
                TaskInventoryScriptUpdater uploader =
                    new TaskInventoryScriptUpdater(
                        llsdUpdateRequest.item_id,
                        llsdUpdateRequest.task_id,
                        llsdUpdateRequest.is_script_running,
                        capsBase + uploaderPath,
                        m_HostCapsObj.HttpListener,
                        m_dumpAssetsToFile);
                uploader.OnUpLoad += TaskScriptUpdated;
                m_HostCapsObj.HttpListener.AddStreamHandler(
                    new BinaryStreamHandler(
                        "POST", capsBase + uploaderPath, uploader.uploaderCaps, "TaskInventoryScriptUpdater", null));
                string protocol = "http://";
                if (m_HostCapsObj.SSLCaps)
                    protocol = "https://";
                string uploaderURL = protocol + m_HostCapsObj.HostName + ":" + m_HostCapsObj.Port.ToString() + capsBase +
                                     uploaderPath;
                LLSDAssetUploadResponse uploadResponse = new LLSDAssetUploadResponse();
                uploadResponse.uploader = uploaderURL;
                uploadResponse.state = "upload";
                return LLSDHelpers.SerialiseLLSDReply(uploadResponse);
            }
            catch (Exception e)
            {
                m_log.Error("[CAPS]: " + e.ToString());
            }
            return null;
        }
public string ScriptTaskInventory ( string request , string path , string param , IOSHttpRequest httpRequest , IOSHttpResponse httpResponse ) { try { Hashtable hash = ( Hashtable ) LLSD . LLSDDeserialize ( Utils . StringToBytes ( request ) ) ; LLSDTaskScriptUpdate llsdUpdateRequest = new LLSDTaskScriptUpdate ( ) ; LLSDHelpers . DeserialiseOSDMap ( hash , llsdUpdateRequest ) ; string capsBase = " " + m_HostCapsObj . CapsObjectPath ; string uploaderPath = Util . RandomClass . Next ( 5000 , 8000 ) . ToString ( " " ) ; TaskInventoryScriptUpdater uploader = new TaskInventoryScriptUpdater ( llsdUpdateRequest . item_id , llsdUpdateRequest . task_id , llsdUpdateRequest . is_script_running , capsBase + uploaderPath , m_HostCapsObj . HttpListener , m_dumpAssetsToFile ) ; uploader . OnUpLoad += TaskScriptUpdated ; m_HostCapsObj . HttpListener . AddStreamHandler ( new BinaryStreamHandler ( " " , capsBase + uploaderPath , uploader . uploaderCaps , " " , null ) ) ; string protocol = " " ; if ( m_HostCapsObj . SSLCaps ) protocol = " " ; string uploaderURL = protocol + m_HostCapsObj . HostName + " " + m_HostCapsObj . Port . ToString ( ) + capsBase + uploaderPath ; LLSDAssetUploadResponse uploadResponse = new LLSDAssetUploadResponse ( ) ; uploadResponse . uploader = uploaderURL ; uploadResponse . state = " " ; return LLSDHelpers . SerialiseLLSDReply ( uploadResponse ) ; } catch ( Exception e ) { m_log . Error ( " " + e . ToString ( ) ) ; } return null ; }
Called by the script task update handler.
Called by the script task update handler .
//                m_log.Debug("[CAPS]: ScriptTaskInventory Request in region: " + m_regionName); //m_log.DebugFormat("[CAPS]: request: {0}, path: {1}, param: {2}", request, path, param); //                m_log.InfoFormat("[CAPS]: " + //                                 "ScriptTaskInventory response: {0}", //                                 LLSDHelpers.SerialiseLLSDReply(uploadResponse)));
None
request
string
None
path
string
None
param
string
None
httpRequest
IOSHttpRequest
HTTP request header object
HTTP request header object
httpResponse
IOSHttpResponse
HTTP response header object
HTTP response header object