mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
replace external httpserver by embedded one (based on same code) - This may still be very bad; clean solution and runprebuild, or clone to clan folder
This commit is contained in:
@@ -30,7 +30,7 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using HttpServer;
|
||||
using OSHttpServer;
|
||||
using log4net;
|
||||
using OpenMetaverse;
|
||||
|
||||
@@ -130,8 +130,16 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
return;
|
||||
}
|
||||
|
||||
if (responsedata.ContainsKey("error_status_text"))
|
||||
response.StatusDescription = (string)responsedata["error_status_text"];
|
||||
|
||||
response.StatusCode = responsecode;
|
||||
if (responsecode == (int)OSHttpStatusCode.RedirectMovedPermanently)
|
||||
{
|
||||
response.AddHeader("Location:", (string)responsedata["str_redirect_location"]);
|
||||
response.KeepAlive = false;
|
||||
PollServiceArgs.RequestsHandled++;
|
||||
response.Send();
|
||||
return;
|
||||
}
|
||||
|
||||
if (responsedata.ContainsKey("http_protocol_version"))
|
||||
response.ProtocolVersion = (string)responsedata["http_protocol_version"];
|
||||
@@ -142,17 +150,13 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
if (responsedata.ContainsKey("prio"))
|
||||
response.Priority = (int)responsedata["prio"];
|
||||
|
||||
if (responsedata.ContainsKey("error_status_text"))
|
||||
response.StatusDescription = (string)responsedata["error_status_text"];
|
||||
|
||||
// Cross-Origin Resource Sharing with simple requests
|
||||
if (responsedata.ContainsKey("access_control_allow_origin"))
|
||||
response.AddHeader("Access-Control-Allow-Origin", (string)responsedata["access_control_allow_origin"]);
|
||||
|
||||
response.StatusCode = responsecode;
|
||||
|
||||
if (responsecode == (int)OSHttpStatusCode.RedirectMovedPermanently)
|
||||
{
|
||||
response.RedirectLocation = (string)responsedata["str_redirect_location"];
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(contentType))
|
||||
response.AddHeader("Content-Type", "text/html");
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user