aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorMelanie2010-10-10 22:07:51 +0100
committerMelanie2010-10-10 22:07:51 +0100
commit30f926aab6c564f76491d5de130bde3f9e5b738d (patch)
tree1b984f37ce568503de8da1bdfabe3013a53f9ed4 /OpenSim/Region/CoreModules
parentChange the part for sound playback to be the root part / object UUID instead (diff)
parent* Make line endings consistant in Meshmerizer.cs (diff)
downloadopensim-SC_OLD-30f926aab6c564f76491d5de130bde3f9e5b738d.zip
opensim-SC_OLD-30f926aab6c564f76491d5de130bde3f9e5b738d.tar.gz
opensim-SC_OLD-30f926aab6c564f76491d5de130bde3f9e5b738d.tar.bz2
opensim-SC_OLD-30f926aab6c564f76491d5de130bde3f9e5b738d.tar.xz
Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs12
1 files changed, 10 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs b/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs
index a3238df..97581e5 100644
--- a/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs
@@ -187,8 +187,16 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
187 int start, end; 187 int start, end;
188 if (TryParseRange(range, out start, out end)) 188 if (TryParseRange(range, out start, out end))
189 { 189 {
190 end = Utils.Clamp(end, 1, texture.Data.Length - 1); 190 // Before clamping start make sure we can satisfy it in order to avoid
191 start = Utils.Clamp(start, 0, end - 1); 191 // sending back the last byte instead of an error status
192 if (start >= texture.Data.Length)
193 {
194 response.StatusCode = (int)System.Net.HttpStatusCode.RequestedRangeNotSatisfiable;
195 return;
196 }
197
198 end = Utils.Clamp(end, 0, texture.Data.Length - 1);
199 start = Utils.Clamp(start, 0, end);
192 int len = end - start + 1; 200 int len = end - start + 1;
193 201
194 //m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID); 202 //m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID);