Stop also adding an ordinary http handler when we set up a poll http handler.
It appears that this is entirely unnecessary since the poll http handlers are dealt with on a separate code path.iar_mods
parent
8e542cfa03
commit
e6272b8d56
|
@ -232,9 +232,8 @@ namespace OpenSim.Framework.Console
|
|||
|
||||
string uri = "/ReadResponses/" + sessionID.ToString() + "/";
|
||||
|
||||
m_Server.AddPollServiceHTTPHandler(uri, HandleHttpPoll,
|
||||
new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents,
|
||||
sessionID));
|
||||
m_Server.AddPollServiceHTTPHandler(
|
||||
uri, new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, sessionID));
|
||||
|
||||
XmlDocument xmldoc = new XmlDocument();
|
||||
XmlNode xmlnode = xmldoc.CreateNode(XmlNodeType.XmlDeclaration,
|
||||
|
@ -266,11 +265,6 @@ namespace OpenSim.Framework.Console
|
|||
return reply;
|
||||
}
|
||||
|
||||
private Hashtable HandleHttpPoll(Hashtable request)
|
||||
{
|
||||
return new Hashtable();
|
||||
}
|
||||
|
||||
private Hashtable HandleHttpCloseSession(Hashtable request)
|
||||
{
|
||||
DoExpire();
|
||||
|
|
|
@ -227,21 +227,17 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
return new List<string>(m_HTTPHandlers.Keys);
|
||||
}
|
||||
|
||||
public bool AddPollServiceHTTPHandler(string methodName, GenericHTTPMethod handler, PollServiceEventArgs args)
|
||||
public bool AddPollServiceHTTPHandler(string methodName, PollServiceEventArgs args)
|
||||
{
|
||||
bool pollHandlerResult = false;
|
||||
lock (m_pollHandlers)
|
||||
{
|
||||
if (!m_pollHandlers.ContainsKey(methodName))
|
||||
{
|
||||
m_pollHandlers.Add(methodName,args);
|
||||
pollHandlerResult = true;
|
||||
m_pollHandlers.Add(methodName, args);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (pollHandlerResult)
|
||||
return AddHTTPHandler(methodName, handler);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1848,8 +1844,6 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
{
|
||||
lock (m_pollHandlers)
|
||||
m_pollHandlers.Remove(path);
|
||||
|
||||
RemoveHTTPHandler(httpMethod, path);
|
||||
}
|
||||
|
||||
public bool RemoveAgentHandler(string agent, IHttpAgentHandler handler)
|
||||
|
|
|
@ -77,8 +77,8 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
/// true if the handler was successfully registered, false if a handler with the same name already existed.
|
||||
/// </returns>
|
||||
bool AddHTTPHandler(string methodName, GenericHTTPMethod handler);
|
||||
|
||||
bool AddPollServiceHTTPHandler(string methodName, GenericHTTPMethod handler, PollServiceEventArgs args);
|
||||
|
||||
bool AddPollServiceHTTPHandler(string methodName, PollServiceEventArgs args);
|
||||
|
||||
/// <summary>
|
||||
/// Adds a LLSD handler, yay.
|
||||
|
|
|
@ -361,7 +361,6 @@ namespace OpenSim.Region.ClientStack.Linden
|
|||
// This will persist this beyond the expiry of the caps handlers
|
||||
MainServer.Instance.AddPollServiceHTTPHandler(
|
||||
capsBase + EventQueueGetUUID.ToString() + "/",
|
||||
EventQueuePoll,
|
||||
new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, agentID));
|
||||
|
||||
Random rnd = new Random(Environment.TickCount);
|
||||
|
@ -578,11 +577,6 @@ namespace OpenSim.Region.ClientStack.Linden
|
|||
// return responsedata;
|
||||
// }
|
||||
|
||||
public Hashtable EventQueuePoll(Hashtable request)
|
||||
{
|
||||
return new Hashtable();
|
||||
}
|
||||
|
||||
// public Hashtable EventQueuePath2(Hashtable request)
|
||||
// {
|
||||
// string capuuid = (string)request["uri"]; //path.Replace("/CAPS/EQG/","");
|
||||
|
|
|
@ -90,11 +90,6 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
|||
get { return null; }
|
||||
}
|
||||
|
||||
private Hashtable HandleHttpPoll(Hashtable request)
|
||||
{
|
||||
return new Hashtable();
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return "UrlModule"; }
|
||||
|
@ -171,9 +166,9 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
|||
|
||||
string uri = "/lslhttp/" + urlcode.ToString() + "/";
|
||||
|
||||
m_HttpServer.AddPollServiceHTTPHandler(uri,HandleHttpPoll,
|
||||
new PollServiceEventArgs(HttpRequestHandler,HasEvents, GetEvents, NoEvents,
|
||||
urlcode));
|
||||
m_HttpServer.AddPollServiceHTTPHandler(
|
||||
uri,
|
||||
new PollServiceEventArgs(HttpRequestHandler, HasEvents, GetEvents, NoEvents, urlcode));
|
||||
|
||||
engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_GRANTED", url });
|
||||
}
|
||||
|
@ -213,9 +208,9 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
|||
|
||||
string uri = "/lslhttps/" + urlcode.ToString() + "/";
|
||||
|
||||
m_HttpsServer.AddPollServiceHTTPHandler(uri,HandleHttpPoll,
|
||||
new PollServiceEventArgs(HttpRequestHandler,HasEvents, GetEvents, NoEvents,
|
||||
urlcode));
|
||||
m_HttpsServer.AddPollServiceHTTPHandler(
|
||||
uri,
|
||||
new PollServiceEventArgs(HttpRequestHandler, HasEvents, GetEvents, NoEvents, urlcode));
|
||||
|
||||
engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_GRANTED", url });
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue