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 0e4a941..6537f64 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)
@@ -85,7 +89,7 @@ namespace OpenSim.Framework.Servers.HttpServer
85 response.SendChunked = false; 89 response.SendChunked = false;
86 response.ContentLength64 = buffer.Length; 90 response.ContentLength64 = buffer.Length;
87 response.ContentEncoding = Encoding.UTF8; 91 response.ContentEncoding = Encoding.UTF8;
88 response.ReuseContext = false; 92// response.ReuseContext = false;
89 93
90 try 94 try
91 { 95 {
@@ -110,7 +114,7 @@ namespace OpenSim.Framework.Servers.HttpServer
110 response.SendChunked = false; 114 response.SendChunked = false;
111 response.ContentLength64 = 0; 115 response.ContentLength64 = 0;
112 response.ContentEncoding = Encoding.UTF8; 116 response.ContentEncoding = Encoding.UTF8;
113 response.ReuseContext = false; 117// response.ReuseContext = false;
114 response.KeepAlive = false; 118 response.KeepAlive = false;
115 response.SendChunked = false; 119 response.SendChunked = false;
116 response.StatusCode = 503; 120 response.StatusCode = 503;
@@ -132,8 +136,9 @@ namespace OpenSim.Framework.Servers.HttpServer
132 { 136 {
133 if (b1.contextHash != b2.contextHash) 137 if (b1.contextHash != b2.contextHash)
134 return false; 138 return false;
135 bool b = Object.ReferenceEquals(b1.HttpContext, b2.HttpContext); 139// bool b = Object.ReferenceEquals(b1.HttpContext, b2.HttpContext);
136 return b; 140// return b;
141 return true;
137 } 142 }
138 143
139 public int GetHashCode(PollServiceHttpRequest b2) 144 public int GetHashCode(PollServiceHttpRequest b2)