mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 09:45:47 +08:00
remove some redundancy
This commit is contained in:
@@ -42,42 +42,17 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public readonly PollServiceEventArgs PollServiceArgs;
|
||||
public readonly IHttpClientContext HttpContext;
|
||||
public readonly IHttpRequest Request;
|
||||
public readonly int RequestTime;
|
||||
public readonly UUID RequestID;
|
||||
public int contextHash;
|
||||
|
||||
/*
|
||||
private void GenContextHash()
|
||||
{
|
||||
|
||||
Random rnd = new Random();
|
||||
contextHash = 0;
|
||||
if (Request.Headers["remote_addr"] != null)
|
||||
contextHash = (Request.Headers["remote_addr"]).GetHashCode() << 16;
|
||||
else
|
||||
contextHash = rnd.Next() << 16;
|
||||
if (Request.Headers["remote_port"] != null)
|
||||
{
|
||||
string[] strPorts = Request.Headers["remote_port"].Split(new char[] { ',' });
|
||||
contextHash += Int32.Parse(strPorts[0]);
|
||||
}
|
||||
else
|
||||
contextHash += rnd.Next() & 0xffff;
|
||||
|
||||
}
|
||||
*/
|
||||
public PollServiceHttpRequest(
|
||||
PollServiceEventArgs pPollServiceArgs, IHttpClientContext pHttpContext, IHttpRequest pRequest)
|
||||
PollServiceEventArgs pPollServiceArgs, IHttpRequest pRequest)
|
||||
{
|
||||
PollServiceArgs = pPollServiceArgs;
|
||||
HttpContext = pHttpContext;
|
||||
Request = pRequest;
|
||||
RequestTime = System.Environment.TickCount;
|
||||
RequestID = UUID.Random();
|
||||
// GenContextHash();
|
||||
contextHash = HttpContext.contextID;
|
||||
}
|
||||
|
||||
internal void DoHTTPGruntWork(Hashtable responsedata)
|
||||
@@ -85,8 +60,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
if (Request.Body.CanRead)
|
||||
Request.Body.Dispose();
|
||||
|
||||
OSHttpResponse response
|
||||
= new OSHttpResponse(new HttpResponse(HttpContext, Request));
|
||||
OSHttpResponse response = new OSHttpResponse(new HttpResponse(Request));
|
||||
|
||||
if (responsedata == null)
|
||||
{
|
||||
@@ -248,8 +222,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
|
||||
internal void DoHTTPstop()
|
||||
{
|
||||
OSHttpResponse response
|
||||
= new OSHttpResponse(new HttpResponse(HttpContext, Request));
|
||||
OSHttpResponse response = new OSHttpResponse(new HttpResponse(Request));
|
||||
|
||||
if(Request.Body.CanRead)
|
||||
Request.Body.Dispose();
|
||||
|
||||
Reference in New Issue
Block a user