From 617f1b9223375a2dda925e26c395901810d37697 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 26 Sep 2012 16:17:49 +0100 Subject: [PATCH] just remove the damm thing --- .../Servers/HttpServer/BaseHttpServer.cs | 1 + .../Servers/HttpServer/PollServiceEventArgs.cs | 9 +-------- .../HttpServer/PollServiceRequestManager.cs | 18 +----------------- .../Caps/EventQueue/EventQueueGetModule.cs | 2 +- .../Linden/Caps/GetTextureModule.cs | 2 +- .../Linden/Caps/WebFetchInvDescModule.cs | 2 +- .../CoreModules/Scripting/LSLHttp/UrlModule.cs | 2 +- 7 files changed, 7 insertions(+), 29 deletions(-) diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index 2582b7bac7..788a0b95ee 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs @@ -317,6 +317,7 @@ namespace OpenSim.Framework.Servers.HttpServer StreamReader reader = new StreamReader(requestStream, encoding); string requestBody = reader.ReadToEnd(); + reader.Close(); Hashtable keysvals = new Hashtable(); Hashtable headervals = new Hashtable(); diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs index f85509a8e6..d0a37d0f81 100644 --- a/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs +++ b/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs @@ -34,7 +34,7 @@ namespace OpenSim.Framework.Servers.HttpServer public delegate void RequestMethod(UUID requestID, Hashtable request); public delegate bool HasEventsMethod(UUID requestID, UUID pId); - public delegate Hashtable GetEventsMethod(UUID requestID, UUID pId, string request); + public delegate Hashtable GetEventsMethod(UUID requestID, UUID pId); public delegate Hashtable NoEventsMethod(UUID requestID, UUID pId); @@ -47,13 +47,6 @@ namespace OpenSim.Framework.Servers.HttpServer public UUID Id; public int TimeOutms; public EventType Type; - // must be set true for cases where GetEvents needs to access the request body - // at each pool. http can start processing before having the full body - // but not sure if this is active for poll events - // if original coder thinked its needed i keep it - // if the Event has a Request method this seems to smoke for now - // seems for now nothing actually uses this so default to false - public bool GetEventsNeedsRequestBody = false; public enum EventType : int { diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs index c379747fa7..c09bf1412f 100644 --- a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs +++ b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs @@ -336,23 +336,7 @@ namespace OpenSim.Framework.Servers.HttpServer { if (req.PollServiceArgs.HasEvents(req.RequestID, req.PollServiceArgs.Id)) { - string strreq = ""; - if (req.PollServiceArgs.GetEventsNeedsRequestBody) - { - try - { - // should we try to seek back? fear we can't - str = new StreamReader(req.Request.Body); - strreq = str.ReadToEnd(); - str.Close(); - } - catch - { - continue; - } - } - - Hashtable responsedata = req.PollServiceArgs.GetEvents(req.RequestID, req.PollServiceArgs.Id, strreq); + Hashtable responsedata = req.PollServiceArgs.GetEvents(req.RequestID, req.PollServiceArgs.Id); if (responsedata == null) continue; diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs index ebfe68721e..e113c60fd1 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs @@ -419,7 +419,7 @@ namespace OpenSim.Region.ClientStack.Linden } } - public Hashtable GetEvents(UUID requestID, UUID pAgentId, string request) + public Hashtable GetEvents(UUID requestID, UUID pAgentId) { if (DebugLevel >= 2) m_log.DebugFormat("POLLED FOR EQ MESSAGES BY {0} in {1}", pAgentId, m_scene.RegionInfo.RegionName); diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs index 5169f65453..cc65981200 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs @@ -160,7 +160,7 @@ namespace OpenSim.Region.ClientStack.Linden lock (responses) return responses.ContainsKey(x); }; - GetEvents = (x, y, s) => + GetEvents = (x, y) => { lock (responses) { diff --git a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs index 0f305b117b..0caeddf2b2 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs @@ -150,7 +150,7 @@ namespace OpenSim.Region.ClientStack.Linden base(null, null, null, null, pId, int.MaxValue) { HasEvents = (x, y) => { lock (responses) return responses.ContainsKey(x); }; - GetEvents = (x, y, s) => + GetEvents = (x, y) => { lock (responses) { diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs index 13762f7993..56221aa9ce 100644 --- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs @@ -444,7 +444,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp } } } - private Hashtable GetEvents(UUID requestID, UUID sessionID, string request) + private Hashtable GetEvents(UUID requestID, UUID sessionID) { UrlData url = null; RequestData requestData = null;