diff options
Diffstat (limited to '')
5 files changed, 12 insertions, 15 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs index 9b27a6e..f85509a 100644 --- a/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs +++ b/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs | |||
@@ -46,8 +46,14 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
46 | public RequestMethod Request; | 46 | public RequestMethod Request; |
47 | public UUID Id; | 47 | public UUID Id; |
48 | public int TimeOutms; | 48 | public int TimeOutms; |
49 | public EventType Type; | 49 | public EventType Type; |
50 | public bool GetEventsNeedsRequest = true; | 50 | // must be set true for cases where GetEvents needs to access the request body |
51 | // at each pool. http can start processing before having the full body | ||
52 | // but not sure if this is active for poll events | ||
53 | // if original coder thinked its needed i keep it | ||
54 | // if the Event has a Request method this seems to smoke for now | ||
55 | // seems for now nothing actually uses this so default to false | ||
56 | public bool GetEventsNeedsRequestBody = false; | ||
51 | 57 | ||
52 | public enum EventType : int | 58 | public enum EventType : int |
53 | { | 59 | { |
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs index cc9ddc2..c379747 100644 --- a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs +++ b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs | |||
@@ -337,10 +337,11 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
337 | if (req.PollServiceArgs.HasEvents(req.RequestID, req.PollServiceArgs.Id)) | 337 | if (req.PollServiceArgs.HasEvents(req.RequestID, req.PollServiceArgs.Id)) |
338 | { | 338 | { |
339 | string strreq = ""; | 339 | string strreq = ""; |
340 | if (req.PollServiceArgs.GetEventsNeedsRequest) | 340 | if (req.PollServiceArgs.GetEventsNeedsRequestBody) |
341 | { | 341 | { |
342 | try | 342 | try |
343 | { | 343 | { |
344 | // should we try to seek back? fear we can't | ||
344 | str = new StreamReader(req.Request.Body); | 345 | str = new StreamReader(req.Request.Body); |
345 | strreq = str.ReadToEnd(); | 346 | strreq = str.ReadToEnd(); |
346 | str.Close(); | 347 | str.Close(); |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs index 8a607fb..5169f65 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs | |||
@@ -151,12 +151,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
151 | private Scene m_scene; | 151 | private Scene m_scene; |
152 | 152 | ||
153 | public PollServiceTextureEventArgs(UUID pId, Scene scene) : | 153 | public PollServiceTextureEventArgs(UUID pId, Scene scene) : |
154 | base(null, null, null, null, pId, int.MaxValue) | 154 | base(null, null, null, null, pId, int.MaxValue) |
155 | // this should never timeout | ||
156 | // each request must be processed and return a response | ||
157 | // noevents can possible be use for nice shutdown, but not sure now | ||
158 | // the execution will provide a proper response even if it fails | ||
159 | |||
160 | { | 155 | { |
161 | m_scene = scene; | 156 | m_scene = scene; |
162 | 157 | ||
@@ -219,7 +214,6 @@ namespace OpenSim.Region.ClientStack.Linden | |||
219 | UUID requestID = requestinfo.reqID; | 214 | UUID requestID = requestinfo.reqID; |
220 | 215 | ||
221 | // If the avatar is gone, don't bother to get the texture | 216 | // If the avatar is gone, don't bother to get the texture |
222 | |||
223 | if (m_scene.GetScenePresence(Id) == null) | 217 | if (m_scene.GetScenePresence(Id) == null) |
224 | { | 218 | { |
225 | response = new Hashtable(); | 219 | response = new Hashtable(); |
@@ -246,12 +240,10 @@ namespace OpenSim.Region.ClientStack.Linden | |||
246 | { | 240 | { |
247 | string capUrl = "/CAPS/" + UUID.Random() + "/"; | 241 | string capUrl = "/CAPS/" + UUID.Random() + "/"; |
248 | 242 | ||
249 | // Register this as a poll service | 243 | // Register this as a poll service |
250 | // absurd large timeout to tune later to make a bit less than viewer | ||
251 | PollServiceTextureEventArgs args = new PollServiceTextureEventArgs(agentID, m_scene); | 244 | PollServiceTextureEventArgs args = new PollServiceTextureEventArgs(agentID, m_scene); |
252 | 245 | ||
253 | args.Type = PollServiceEventArgs.EventType.Texture; | 246 | args.Type = PollServiceEventArgs.EventType.Texture; |
254 | args.GetEventsNeedsRequest = false; | ||
255 | MainServer.Instance.AddPollServiceHTTPHandler(capUrl, args); | 247 | MainServer.Instance.AddPollServiceHTTPHandler(capUrl, args); |
256 | 248 | ||
257 | string hostName = m_scene.RegionInfo.ExternalHostName; | 249 | string hostName = m_scene.RegionInfo.ExternalHostName; |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs index 56070c6..0f305b1 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs | |||
@@ -223,7 +223,6 @@ namespace OpenSim.Region.ClientStack.Linden | |||
223 | PollServiceInventoryEventArgs args = new PollServiceInventoryEventArgs(agentID); | 223 | PollServiceInventoryEventArgs args = new PollServiceInventoryEventArgs(agentID); |
224 | 224 | ||
225 | args.Type = PollServiceEventArgs.EventType.Inventory; | 225 | args.Type = PollServiceEventArgs.EventType.Inventory; |
226 | args.GetEventsNeedsRequest = false; | ||
227 | MainServer.Instance.AddPollServiceHTTPHandler(capUrl, args); | 226 | MainServer.Instance.AddPollServiceHTTPHandler(capUrl, args); |
228 | 227 | ||
229 | string hostName = m_scene.RegionInfo.ExternalHostName; | 228 | string hostName = m_scene.RegionInfo.ExternalHostName; |
diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs index d4a4832..13762f7 100644 --- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs | |||
@@ -186,7 +186,6 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
186 | 186 | ||
187 | PollServiceEventArgs args = new PollServiceEventArgs(HttpRequestHandler, HasEvents, GetEvents, NoEvents, urlcode, 25000); | 187 | PollServiceEventArgs args = new PollServiceEventArgs(HttpRequestHandler, HasEvents, GetEvents, NoEvents, urlcode, 25000); |
188 | args.Type = PollServiceEventArgs.EventType.LslHttp; | 188 | args.Type = PollServiceEventArgs.EventType.LslHttp; |
189 | args.GetEventsNeedsRequest = false; | ||
190 | m_HttpServer.AddPollServiceHTTPHandler(uri, args); | 189 | m_HttpServer.AddPollServiceHTTPHandler(uri, args); |
191 | 190 | ||
192 | // m_log.DebugFormat( | 191 | // m_log.DebugFormat( |