aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie2010-09-13 23:28:36 +0100
committerMelanie2010-09-13 23:28:36 +0100
commit0de2f0567d2e1a92bf95bc49eeaa8ed0743ddd36 (patch)
treeb697e3499f63be96b408ef5c3569c6b56b29e17e
parentChange the help message to point to copying OpenSimDefaults.ini.example. (diff)
parentAdding missing ConnectionString lines to [DatabaseService] sections for SQLit... (diff)
downloadopensim-SC_OLD-0de2f0567d2e1a92bf95bc49eeaa8ed0743ddd36.zip
opensim-SC_OLD-0de2f0567d2e1a92bf95bc49eeaa8ed0743ddd36.tar.gz
opensim-SC_OLD-0de2f0567d2e1a92bf95bc49eeaa8ed0743ddd36.tar.bz2
opensim-SC_OLD-0de2f0567d2e1a92bf95bc49eeaa8ed0743ddd36.tar.xz
Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs10
-rw-r--r--bin/config-include/storage/SQLiteLegacyStandalone.ini1
-rw-r--r--bin/config-include/storage/SQLiteStandalone.ini1
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"