diff options
Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs | 10 | ||||
-rw-r--r-- | bin/config-include/storage/SQLiteLegacyStandalone.ini | 1 | ||||
-rw-r--r-- | bin/config-include/storage/SQLiteStandalone.ini | 1 |
3 files changed, 8 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs b/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs index 8aa87fd..a3238df 100644 --- a/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs | |||
@@ -187,18 +187,20 @@ 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); | 190 | end = Utils.Clamp(end, 1, texture.Data.Length - 1); |
191 | start = Utils.Clamp(start, 0, end - 1); | 191 | start = Utils.Clamp(start, 0, end - 1); |
192 | int len = end - start + 1; | ||
192 | 193 | ||
193 | //m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID); | 194 | //m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID); |
194 | 195 | ||
195 | if (end - start < texture.Data.Length) | 196 | if (len < texture.Data.Length) |
196 | response.StatusCode = (int)System.Net.HttpStatusCode.PartialContent; | 197 | response.StatusCode = (int)System.Net.HttpStatusCode.PartialContent; |
197 | 198 | ||
198 | response.ContentLength = end - start; | 199 | response.ContentLength = len; |
199 | response.ContentType = texture.Metadata.ContentType; | 200 | response.ContentType = texture.Metadata.ContentType; |
201 | response.AddHeader("Content-Range", String.Format("bytes {0}-{1}/{2}", start, end, texture.Data.Length)); | ||
200 | 202 | ||
201 | response.Body.Write(texture.Data, start, end - start); | 203 | response.Body.Write(texture.Data, start, len); |
202 | } | 204 | } |
203 | else | 205 | else |
204 | { | 206 | { |
diff --git a/bin/config-include/storage/SQLiteLegacyStandalone.ini b/bin/config-include/storage/SQLiteLegacyStandalone.ini index 1d4dd29..facbbd6 100644 --- a/bin/config-include/storage/SQLiteLegacyStandalone.ini +++ b/bin/config-include/storage/SQLiteLegacyStandalone.ini | |||
@@ -2,6 +2,7 @@ | |||
2 | 2 | ||
3 | [DatabaseService] | 3 | [DatabaseService] |
4 | StorageProvider = "OpenSim.Data.SQLiteLegacy.dll" | 4 | StorageProvider = "OpenSim.Data.SQLiteLegacy.dll" |
5 | ConnectionString = "URI=file:OpenSim.db,version=3,UseUTF16Encoding=True" | ||
5 | 6 | ||
6 | [AvatarService] | 7 | [AvatarService] |
7 | ConnectionString = "URI=file:avatars.db,version=3" | 8 | ConnectionString = "URI=file:avatars.db,version=3" |
diff --git a/bin/config-include/storage/SQLiteStandalone.ini b/bin/config-include/storage/SQLiteStandalone.ini index fe814d7..10e6991 100644 --- a/bin/config-include/storage/SQLiteStandalone.ini +++ b/bin/config-include/storage/SQLiteStandalone.ini | |||
@@ -2,6 +2,7 @@ | |||
2 | 2 | ||
3 | [DatabaseService] | 3 | [DatabaseService] |
4 | StorageProvider = "OpenSim.Data.SQLite.dll" | 4 | StorageProvider = "OpenSim.Data.SQLite.dll" |
5 | ConnectionString = "URI=file:OpenSim.db,version=3,UseUTF16Encoding=True" | ||
5 | 6 | ||
6 | [InventoryService] | 7 | [InventoryService] |
7 | ;ConnectionString = "URI=file:inventory.db,version=3" | 8 | ;ConnectionString = "URI=file:inventory.db,version=3" |