mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 08:55:56 +08:00
add auxiliar httpresponse.Redirect(string url, [HttpStatusCode redirStatusCode = HttpStatusCode.Redirect])
This commit is contained in:
@@ -116,16 +116,17 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
return;
|
||||
}
|
||||
|
||||
response.StatusCode = responsecode;
|
||||
if (responsecode == (int)HttpStatusCode.Moved)
|
||||
{
|
||||
response.AddHeader("Location", (string)responsedata["str_redirect_location"]);
|
||||
response.Redirect((string)responsedata["str_redirect_location"], HttpStatusCode.Moved);
|
||||
response.KeepAlive = false;
|
||||
PollServiceArgs.RequestsHandled++;
|
||||
response.Send();
|
||||
return;
|
||||
}
|
||||
|
||||
response.StatusCode = responsecode;
|
||||
|
||||
if (responsedata.ContainsKey("http_protocol_version"))
|
||||
response.ProtocolVersion = (string)responsedata["http_protocol_version"];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user