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