diff options
author | Teravus Ovares | 2008-06-16 22:06:55 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-06-16 22:06:55 +0000 |
commit | 53c9ce46b3cdb9a4bb1cbb5d91641bbacf70866c (patch) | |
tree | a0612fba2bf2d51e466f019f72cb1f37275fb2f5 /OpenSim/Framework/Servers | |
parent | * minor: Get rid of rogue "Current node RootPart" message in the SceneObjectG... (diff) | |
download | opensim-SC_OLD-53c9ce46b3cdb9a4bb1cbb5d91641bbacf70866c.zip opensim-SC_OLD-53c9ce46b3cdb9a4bb1cbb5d91641bbacf70866c.tar.gz opensim-SC_OLD-53c9ce46b3cdb9a4bb1cbb5d91641bbacf70866c.tar.bz2 opensim-SC_OLD-53c9ce46b3cdb9a4bb1cbb5d91641bbacf70866c.tar.xz |
* 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.
Diffstat (limited to 'OpenSim/Framework/Servers')
-rw-r--r-- | OpenSim/Framework/Servers/BaseHttpServer.cs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs index a69cb63..22698d0 100644 --- a/OpenSim/Framework/Servers/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/BaseHttpServer.cs | |||
@@ -641,8 +641,17 @@ namespace OpenSim.Framework.Servers | |||
641 | } | 641 | } |
642 | 642 | ||
643 | response.AddHeader("Content-type", contentType); | 643 | response.AddHeader("Content-type", contentType); |
644 | |||
645 | byte[] buffer; | ||
644 | 646 | ||
645 | byte[] buffer = Encoding.UTF8.GetBytes(responseString); | 647 | if (!contentType.Contains("image")) |
648 | { | ||
649 | buffer = Encoding.UTF8.GetBytes(responseString); | ||
650 | } | ||
651 | else | ||
652 | { | ||
653 | buffer = Convert.FromBase64String(responseString); | ||
654 | } | ||
646 | 655 | ||
647 | response.SendChunked = false; | 656 | response.SendChunked = false; |
648 | response.ContentLength64 = buffer.Length; | 657 | response.ContentLength64 = buffer.Length; |