aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs')
-rw-r--r--OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs17
1 files changed, 11 insertions, 6 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs
index fefcb20..eb8ca0d 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs
@@ -47,8 +47,10 @@ namespace OpenSim.Framework.Servers.HttpServer
47 public readonly UUID RequestID; 47 public readonly UUID RequestID;
48 public int contextHash; 48 public int contextHash;
49 49
50/*
50 private void GenContextHash() 51 private void GenContextHash()
51 { 52 {
53
52 Random rnd = new Random(); 54 Random rnd = new Random();
53 contextHash = 0; 55 contextHash = 0;
54 if (Request.Headers["remote_addr"] != null) 56 if (Request.Headers["remote_addr"] != null)
@@ -62,8 +64,9 @@ namespace OpenSim.Framework.Servers.HttpServer
62 } 64 }
63 else 65 else
64 contextHash += rnd.Next() & 0xffff; 66 contextHash += rnd.Next() & 0xffff;
65 }
66 67
68 }
69*/
67 public PollServiceHttpRequest( 70 public PollServiceHttpRequest(
68 PollServiceEventArgs pPollServiceArgs, IHttpClientContext pHttpContext, IHttpRequest pRequest) 71 PollServiceEventArgs pPollServiceArgs, IHttpClientContext pHttpContext, IHttpRequest pRequest)
69 { 72 {
@@ -72,7 +75,8 @@ namespace OpenSim.Framework.Servers.HttpServer
72 Request = pRequest; 75 Request = pRequest;
73 RequestTime = System.Environment.TickCount; 76 RequestTime = System.Environment.TickCount;
74 RequestID = UUID.Random(); 77 RequestID = UUID.Random();
75 GenContextHash(); 78// GenContextHash();
79 contextHash = HttpContext.contextID;
76 } 80 }
77 81
78 internal void DoHTTPGruntWork(BaseHttpServer server, Hashtable responsedata) 82 internal void DoHTTPGruntWork(BaseHttpServer server, Hashtable responsedata)
@@ -88,7 +92,7 @@ namespace OpenSim.Framework.Servers.HttpServer
88 response.SendChunked = false; 92 response.SendChunked = false;
89 response.ContentLength64 = buffer.Length; 93 response.ContentLength64 = buffer.Length;
90 response.ContentEncoding = Encoding.UTF8; 94 response.ContentEncoding = Encoding.UTF8;
91 response.ReuseContext = false; 95// response.ReuseContext = false;
92 96
93 try 97 try
94 { 98 {
@@ -116,7 +120,7 @@ namespace OpenSim.Framework.Servers.HttpServer
116 response.SendChunked = false; 120 response.SendChunked = false;
117 response.ContentLength64 = 0; 121 response.ContentLength64 = 0;
118 response.ContentEncoding = Encoding.UTF8; 122 response.ContentEncoding = Encoding.UTF8;
119 response.ReuseContext = false; 123// response.ReuseContext = false;
120 response.KeepAlive = false; 124 response.KeepAlive = false;
121 response.SendChunked = false; 125 response.SendChunked = false;
122 response.StatusCode = 503; 126 response.StatusCode = 503;
@@ -138,8 +142,9 @@ namespace OpenSim.Framework.Servers.HttpServer
138 { 142 {
139 if (b1.contextHash != b2.contextHash) 143 if (b1.contextHash != b2.contextHash)
140 return false; 144 return false;
141 bool b = Object.ReferenceEquals(b1.HttpContext, b2.HttpContext); 145// bool b = Object.ReferenceEquals(b1.HttpContext, b2.HttpContext);
142 return b; 146// return b;
147 return true;
143 } 148 }
144 149
145 public int GetHashCode(PollServiceHttpRequest b2) 150 public int GetHashCode(PollServiceHttpRequest b2)