* Enables binary data in BaseHttpServer with 'image' in content type.

* Enables regular jpeg map images to be served directly from the region.
* EX: http://192.168.1.127:9000/index.php?method=regionImagecc4583cd269b41bfa525dd198e19a5c5
* This is actually HTTP server address + port + index.php?method=regionImage<REGIONUUID, no dashes>
* The Webmap image location gets printed on the console when the simulator starts up.
* JPEG data is cached so we only create the webjpeg once.
This commit is contained in:
Teravus Ovares
2008-06-16 22:06:55 +00:00
parent 1898674254
commit 53c9ce46b3
2 changed files with 90 additions and 2 deletions

View File

@@ -641,8 +641,17 @@ namespace OpenSim.Framework.Servers
}
response.AddHeader("Content-type", contentType);
byte[] buffer;
byte[] buffer = Encoding.UTF8.GetBytes(responseString);
if (!contentType.Contains("image"))
{
buffer = Encoding.UTF8.GetBytes(responseString);
}
else
{
buffer = Convert.FromBase64String(responseString);
}
response.SendChunked = false;
response.ContentLength64 = buffer.Length;