aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Capabilities/Caps.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Communications/Capabilities/Caps.cs')
-rw-r--r--OpenSim/Framework/Communications/Capabilities/Caps.cs44
1 files changed, 40 insertions, 4 deletions
diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs
index e82a5e9..a0c59ad 100644
--- a/OpenSim/Framework/Communications/Capabilities/Caps.cs
+++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs
@@ -104,6 +104,15 @@ namespace OpenSim.Framework.Communications.Capabilities
104 private bool m_dumpAssetsToFile; 104 private bool m_dumpAssetsToFile;
105 private string m_regionName; 105 private string m_regionName;
106 106
107 public bool SSLCaps
108 {
109 get { return m_httpListener.UseSSL; }
110 }
111 public string SSLCommonName
112 {
113 get { return m_httpListener.SSLCommonName; }
114 }
115
107 // These are callbacks which will be setup by the scene so that we can update scene data when we 116 // These are callbacks which will be setup by the scene so that we can update scene data when we
108 // receive capability calls 117 // receive capability calls
109 public NewInventoryItem AddNewInventoryItem = null; 118 public NewInventoryItem AddNewInventoryItem = null;
@@ -119,10 +128,19 @@ namespace OpenSim.Framework.Communications.Capabilities
119 m_capsObjectPath = capsPath; 128 m_capsObjectPath = capsPath;
120 m_httpListener = httpServer; 129 m_httpListener = httpServer;
121 m_httpListenerHostName = httpListen; 130 m_httpListenerHostName = httpListen;
131
122 m_httpListenPort = httpPort; 132 m_httpListenPort = httpPort;
133
134 if (httpServer.UseSSL)
135 {
136 m_httpListenPort = httpServer.SSLPort;
137 httpListen = httpServer.SSLCommonName;
138 httpPort = httpServer.SSLPort;
139 }
140
123 m_agentID = agent; 141 m_agentID = agent;
124 m_dumpAssetsToFile = dumpAssetsToFile; 142 m_dumpAssetsToFile = dumpAssetsToFile;
125 m_capsHandlers = new CapsHandlers(httpServer, httpListen, httpPort); 143 m_capsHandlers = new CapsHandlers(httpServer, httpListen, httpPort, httpServer.UseSSL);
126 m_regionName = regionName; 144 m_regionName = regionName;
127 } 145 }
128 146
@@ -541,7 +559,13 @@ namespace OpenSim.Framework.Communications.Capabilities
541 559
542 m_httpListener.AddStreamHandler( 560 m_httpListener.AddStreamHandler(
543 new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps)); 561 new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps));
544 string uploaderURL = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + capsBase + 562
563 string protocol = "http://";
564
565 if (m_httpListener.UseSSL)
566 protocol = "https://";
567
568 string uploaderURL = protocol + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + capsBase +
545 uploaderPath; 569 uploaderPath;
546 570
547 LLSDAssetUploadResponse uploadResponse = new LLSDAssetUploadResponse(); 571 LLSDAssetUploadResponse uploadResponse = new LLSDAssetUploadResponse();
@@ -587,7 +611,13 @@ namespace OpenSim.Framework.Communications.Capabilities
587 611
588 m_httpListener.AddStreamHandler( 612 m_httpListener.AddStreamHandler(
589 new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps)); 613 new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps));
590 string uploaderURL = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + capsBase + 614
615 string protocol = "http://";
616
617 if (m_httpListener.UseSSL)
618 protocol = "https://";
619
620 string uploaderURL = protocol + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + capsBase +
591 uploaderPath; 621 uploaderPath;
592 622
593 LLSDAssetUploadResponse uploadResponse = new LLSDAssetUploadResponse(); 623 LLSDAssetUploadResponse uploadResponse = new LLSDAssetUploadResponse();
@@ -646,7 +676,13 @@ namespace OpenSim.Framework.Communications.Capabilities
646 llsdRequest.asset_type, capsBase + uploaderPath, m_httpListener, m_dumpAssetsToFile); 676 llsdRequest.asset_type, capsBase + uploaderPath, m_httpListener, m_dumpAssetsToFile);
647 m_httpListener.AddStreamHandler( 677 m_httpListener.AddStreamHandler(
648 new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps)); 678 new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps));
649 string uploaderURL = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + capsBase + 679
680 string protocol = "http://";
681
682 if (m_httpListener.UseSSL)
683 protocol = "https://";
684
685 string uploaderURL = protocol + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + capsBase +
650 uploaderPath; 686 uploaderPath;
651 687
652 LLSDAssetUploadResponse uploadResponse = new LLSDAssetUploadResponse(); 688 LLSDAssetUploadResponse uploadResponse = new LLSDAssetUploadResponse();