aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs16
1 files changed, 12 insertions, 4 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
index 86c990f..21041ec 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs
@@ -59,15 +59,20 @@ namespace OpenSim.Region.ClientStack.Linden
59 private Scene m_scene; 59 private Scene m_scene;
60 private IAssetService m_assetService; 60 private IAssetService m_assetService;
61 61
62 public const string DefaultFormat = "x-j2c";
63
64 // TODO: Change this to a config option 62 // TODO: Change this to a config option
65 const string REDIRECT_URL = null; 63 const string REDIRECT_URL = null;
66 64
65 private string m_URL;
66
67 #region ISharedRegionModule Members 67 #region ISharedRegionModule Members
68 68
69 public void Initialise(IConfigSource pSource) 69 public void Initialise(IConfigSource source)
70 { 70 {
71 IConfig config = source.Configs["ClientStack.LindenCaps"];
72 if (config == null)
73 return;
74
75 m_URL = config.GetString("Cap_GetTexture", "localhost");
71 } 76 }
72 77
73 public void AddRegion(Scene s) 78 public void AddRegion(Scene s)
@@ -105,7 +110,10 @@ namespace OpenSim.Region.ClientStack.Linden
105 110
106 // m_log.InfoFormat("[GETTEXTURE]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName); 111 // m_log.InfoFormat("[GETTEXTURE]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName);
107 //caps.RegisterHandler("GetTexture", new StreamHandler("GET", "/CAPS/" + capID, ProcessGetTexture)); 112 //caps.RegisterHandler("GetTexture", new StreamHandler("GET", "/CAPS/" + capID, ProcessGetTexture));
108 caps.RegisterHandler("GetTexture", new GetTextureHandler("/CAPS/" + capID + "/", m_assetService)); 113 if (m_URL == "localhost")
114 caps.RegisterHandler("GetTexture", new GetTextureHandler("/CAPS/" + capID + "/", m_assetService));
115 else
116 caps.RegisterHandler("GetTexture", m_URL);
109 } 117 }
110 118
111 } 119 }