mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 08:55:56 +08:00
* 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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user