Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim

viewer-2-initial-appearance
Melanie 2010-09-13 23:28:36 +01:00
commit 0de2f0567d
3 changed files with 8 additions and 4 deletions

View File

@ -187,18 +187,20 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
int start, end; int start, end;
if (TryParseRange(range, out start, out end)) if (TryParseRange(range, out start, out end))
{ {
end = Utils.Clamp(end, 1, texture.Data.Length); end = Utils.Clamp(end, 1, texture.Data.Length - 1);
start = Utils.Clamp(start, 0, end - 1); start = Utils.Clamp(start, 0, end - 1);
int len = end - start + 1;
//m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID); //m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID);
if (end - start < texture.Data.Length) if (len < texture.Data.Length)
response.StatusCode = (int)System.Net.HttpStatusCode.PartialContent; response.StatusCode = (int)System.Net.HttpStatusCode.PartialContent;
response.ContentLength = end - start; response.ContentLength = len;
response.ContentType = texture.Metadata.ContentType; response.ContentType = texture.Metadata.ContentType;
response.AddHeader("Content-Range", String.Format("bytes {0}-{1}/{2}", start, end, texture.Data.Length));
response.Body.Write(texture.Data, start, end - start); response.Body.Write(texture.Data, start, len);
} }
else else
{ {

View File

@ -2,6 +2,7 @@
[DatabaseService] [DatabaseService]
StorageProvider = "OpenSim.Data.SQLiteLegacy.dll" StorageProvider = "OpenSim.Data.SQLiteLegacy.dll"
ConnectionString = "URI=file:OpenSim.db,version=3,UseUTF16Encoding=True"
[AvatarService] [AvatarService]
ConnectionString = "URI=file:avatars.db,version=3" ConnectionString = "URI=file:avatars.db,version=3"

View File

@ -2,6 +2,7 @@
[DatabaseService] [DatabaseService]
StorageProvider = "OpenSim.Data.SQLite.dll" StorageProvider = "OpenSim.Data.SQLite.dll"
ConnectionString = "URI=file:OpenSim.db,version=3,UseUTF16Encoding=True"
[InventoryService] [InventoryService]
;ConnectionString = "URI=file:inventory.db,version=3" ;ConnectionString = "URI=file:inventory.db,version=3"