* Just some OGP maintenance. Standards adherence type stuff.
parent
62f3e11b4e
commit
d19400db44
|
@ -587,7 +587,40 @@ namespace OpenSim.Framework.Servers
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
//HandleLLSDRequests(request, response);
|
||||||
|
response.ContentType = "text/plain";
|
||||||
|
response.StatusCode = 404;
|
||||||
|
response.StatusDescription = "Not Found";
|
||||||
|
response.ProtocolVersion = "HTTP/1.0";
|
||||||
|
byte[] buf = Encoding.UTF8.GetBytes("Not found");
|
||||||
|
response.KeepAlive = false;
|
||||||
|
|
||||||
m_log.ErrorFormat("[BASE HTTP SERVER] Handler not found for http request {0}", request.RawUrl);
|
m_log.ErrorFormat("[BASE HTTP SERVER] Handler not found for http request {0}", request.RawUrl);
|
||||||
|
|
||||||
|
response.SendChunked = false;
|
||||||
|
response.ContentLength64 = buf.Length;
|
||||||
|
response.ContentEncoding = Encoding.UTF8;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
response.OutputStream.Write(buf, 0, buf.Length);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
m_log.Warn("[HTTPD]: Error - " + ex.Message);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
response.Send();
|
||||||
|
}
|
||||||
|
catch (SocketException e)
|
||||||
|
{
|
||||||
|
// This has to be here to prevent a Linux/Mono crash
|
||||||
|
m_log.WarnFormat("[BASE HTTP SERVER] XmlRpcRequest issue {0}.\nNOTE: this may be spurious on Linux.", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return;
|
||||||
responseString = "Error";
|
responseString = "Error";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1207,7 +1240,7 @@ namespace OpenSim.Framework.Servers
|
||||||
public void SendHTML404(OSHttpResponse response, string host)
|
public void SendHTML404(OSHttpResponse response, string host)
|
||||||
{
|
{
|
||||||
// I know this statuscode is dumb, but the client doesn't respond to 404s and 500s
|
// I know this statuscode is dumb, but the client doesn't respond to 404s and 500s
|
||||||
response.StatusCode = (int)OSHttpStatusCode.SuccessOk;
|
response.StatusCode = 404;
|
||||||
response.AddHeader("Content-type", "text/html");
|
response.AddHeader("Content-type", "text/html");
|
||||||
|
|
||||||
string responseString = GetHTTP404(host);
|
string responseString = GetHTTP404(host);
|
||||||
|
|
|
@ -858,11 +858,12 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
int rrY = rezResponseMap["region_y"].AsInteger();
|
int rrY = rezResponseMap["region_y"].AsInteger();
|
||||||
m_log.ErrorFormat("X:{0}, Y:{1}", rrX, rrY);
|
m_log.ErrorFormat("X:{0}, Y:{1}", rrX, rrY);
|
||||||
UUID rrRID = rezResponseMap["region_id"].AsUUID();
|
UUID rrRID = rezResponseMap["region_id"].AsUUID();
|
||||||
|
LLSDArray RezResponsePositionArray = null;
|
||||||
string rrAccess = rezResponseMap["sim_access"].AsString();
|
string rrAccess = rezResponseMap["sim_access"].AsString();
|
||||||
|
if (rezResponseMap.ContainsKey("position"))
|
||||||
LLSDArray RezResponsePositionArray = (LLSDArray)rezResponseMap["position"];
|
{
|
||||||
|
RezResponsePositionArray = (LLSDArray)rezResponseMap["position"];
|
||||||
|
}
|
||||||
// DEPRECIATED
|
// DEPRECIATED
|
||||||
responseMap["seed_capability"] = LLSD.FromString(rezRespSeedCap);
|
responseMap["seed_capability"] = LLSD.FromString(rezRespSeedCap);
|
||||||
|
|
||||||
|
@ -878,13 +879,17 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
responseMap["region_y"] = LLSD.FromInteger(rrY );
|
responseMap["region_y"] = LLSD.FromInteger(rrY );
|
||||||
responseMap["region_id"] = LLSD.FromUUID(rrRID);
|
responseMap["region_id"] = LLSD.FromUUID(rrRID);
|
||||||
responseMap["sim_access"] = LLSD.FromString(rrAccess);
|
responseMap["sim_access"] = LLSD.FromString(rrAccess);
|
||||||
|
|
||||||
|
if (RezResponsePositionArray != null)
|
||||||
|
{
|
||||||
responseMap["position"] = RezResponsePositionArray;
|
responseMap["position"] = RezResponsePositionArray;
|
||||||
|
}
|
||||||
responseMap["look_at"] = lookArray;
|
responseMap["look_at"] = lookArray;
|
||||||
responseMap["connect"] = LLSD.FromBoolean(true);
|
responseMap["connect"] = LLSD.FromBoolean(true);
|
||||||
|
|
||||||
ShutdownConnection(LocalID,this);
|
ShutdownConnection(LocalID,this);
|
||||||
|
// PLEASE STOP CHANGING THIS TO an M_LOG, M_LOG DOESN'T WORK ON MULTILINE .TOSTRINGS
|
||||||
m_log.Warn("RESPONSEDEREZ: " + responseMap.ToString());
|
System.Console.WriteLine("RESPONSEDEREZ: " + responseMap.ToString());
|
||||||
return responseMap;
|
return responseMap;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue