aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorJonathan Freedman2010-10-10 18:06:27 -0400
committerJonathan Freedman2010-10-10 18:06:27 -0400
commit2654ab63001c0f102954ffec0c5317ee4dad33c4 (patch)
treee0fb933bc197cc5e71005897b7ecfb3055a4b4eb /OpenSim/Region/CoreModules
parentMerge branch 'master' of git://opensimulator.org/git/opensim (diff)
parentMerge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff)
downloadopensim-SC-2654ab63001c0f102954ffec0c5317ee4dad33c4.zip
opensim-SC-2654ab63001c0f102954ffec0c5317ee4dad33c4.tar.gz
opensim-SC-2654ab63001c0f102954ffec0c5317ee4dad33c4.tar.bz2
opensim-SC-2654ab63001c0f102954ffec0c5317ee4dad33c4.tar.xz
Merge branch 'master' of git://opensimulator.org/git/opensim
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs12
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs5
2 files changed, 14 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/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index d05cfc2..7a175ea 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -208,7 +208,10 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
208 } 208 }
209 209
210 foreach (List<SceneObjectGroup> objlist in deletes.Values) 210 foreach (List<SceneObjectGroup> objlist in deletes.Values)
211 ret = DeleteToInventory(action, folderID, objlist, remoteClient); 211 {
212 foreach (SceneObjectGroup g in objlist)
213 ret = DeleteToInventory(action, folderID, g, remoteClient);
214 }
212 215
213 return ret; 216 return ret;
214 } 217 }