aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-09-06 00:11:47 +0100
committerJustin Clark-Casey (justincc)2012-09-06 00:11:47 +0100
commita0d0c9f751f45d54772af2e33866b27c9be33511 (patch)
treeb94a250c12264f8c44387e79e35b62893dab441b /OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs
parentBump master code up to 0.7.5 now that 0.7.4 is out. (diff)
downloadopensim-SC_OLD-a0d0c9f751f45d54772af2e33866b27c9be33511.zip
opensim-SC_OLD-a0d0c9f751f45d54772af2e33866b27c9be33511.tar.gz
opensim-SC_OLD-a0d0c9f751f45d54772af2e33866b27c9be33511.tar.bz2
opensim-SC_OLD-a0d0c9f751f45d54772af2e33866b27c9be33511.tar.xz
If the GetTexture capability receives a request for a range of data beyond that of an otherwise valid asset, return HTTP PartialContent rather than RequestedRangeNotSatisfiable.
This is because recent viewers (3.2.1, 3.3.4) and probably earlier ones using the http GetTexture capability will sometimes make such invalid range requests. This appears to happen if the viewer's estimate of texture sizes at discard levels > 0 (chiefly 2) exceeds the total texture size. I believe this does not normally happen but can occur for dynamic textures with are large but mainly blank. If this happens, returning a RequestedRangeNotSatisfiable will cause the viewer to not render the texture at the final resolution. However, returning a PartialContent (or OK) even with 0 data will allow the viewer to render the final texture.
Diffstat (limited to 'OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs')
-rw-r--r--OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs
index 4268f2e..0e7051e 100644
--- a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs
@@ -46,6 +46,11 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
46{ 46{
47 public class VectorRenderModule : IRegionModule, IDynamicTextureRender 47 public class VectorRenderModule : IRegionModule, IDynamicTextureRender
48 { 48 {
49 // These fields exist for testing purposes, please do not remove.
50// private static bool s_flipper;
51// private static byte[] s_asset1Data;
52// private static byte[] s_asset2Data;
53
49 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 54 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
50 55
51 private Scene m_scene; 56 private Scene m_scene;
@@ -161,6 +166,13 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
161 { 166 {
162 m_textureManager.RegisterRender(GetContentType(), this); 167 m_textureManager.RegisterRender(GetContentType(), this);
163 } 168 }
169
170 // This code exists for testing purposes, please do not remove.
171// s_asset1Data = m_scene.AssetService.Get("00000000-0000-1111-9999-000000000001").Data;
172// s_asset1Data = m_scene.AssetService.Get("9f4acf0d-1841-4e15-bdb8-3a12efc9dd8f").Data;
173
174 // Terrain dirt - smallest bin/assets file (6004 bytes)
175// s_asset2Data = m_scene.AssetService.Get("b8d3965a-ad78-bf43-699b-bff8eca6c975").Data;
164 } 176 }
165 177
166 public void Close() 178 public void Close()
@@ -364,6 +376,14 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
364 } 376 }
365 377
366 byte[] imageJ2000 = new byte[0]; 378 byte[] imageJ2000 = new byte[0];
379
380 // This code exists for testing purposes, please do not remove.
381// if (s_flipper)
382// imageJ2000 = s_asset1Data;
383// else
384// imageJ2000 = s_asset2Data;
385//
386// s_flipper = !s_flipper;
367 387
368 try 388 try
369 { 389 {