diff options
author | Melanie | 2010-10-10 22:08:36 +0100 |
---|---|---|
committer | Melanie | 2010-10-10 22:08:36 +0100 |
commit | cb79e228e4df4782f03a532c2a20098729a0cca7 (patch) | |
tree | 85faedccb5d89bd81214d77155be3d6cff02aff0 /OpenSim/Region | |
parent | Change the part for sound playback to be the root part / object UUID instead (diff) | |
parent | Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC_OLD-cb79e228e4df4782f03a532c2a20098729a0cca7.zip opensim-SC_OLD-cb79e228e4df4782f03a532c2a20098729a0cca7.tar.gz opensim-SC_OLD-cb79e228e4df4782f03a532c2a20098729a0cca7.tar.bz2 opensim-SC_OLD-cb79e228e4df4782f03a532c2a20098729a0cca7.tar.xz |
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs | 12 | ||||
-rw-r--r-- | OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 2 |
2 files changed, 11 insertions, 3 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); |
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index c97db8c..cf57c0a 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs | |||
@@ -81,7 +81,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
81 | { | 81 | { |
82 | IConfig start_config = config.Configs["Startup"]; | 82 | IConfig start_config = config.Configs["Startup"]; |
83 | 83 | ||
84 | decodedSculptMapPath = start_config.GetString("DecodedSculptMapPath","j2kDecodeCache"); | 84 | decodedSculptMapPath = start_config.GetString("DecodedSculptMapPath","j2kDecodeCache"); |
85 | cacheSculptMaps = start_config.GetBoolean("CacheSculptMaps", cacheSculptMaps); | 85 | cacheSculptMaps = start_config.GetBoolean("CacheSculptMaps", cacheSculptMaps); |
86 | 86 | ||
87 | try | 87 | try |