Seems nothing actually need the request body for getevents. so change
control flag to falseavinationmerge
parent
abb4b9fcae
commit
7e3eba1064
|
@ -47,7 +47,13 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
public UUID Id;
|
public UUID Id;
|
||||||
public int TimeOutms;
|
public int TimeOutms;
|
||||||
public EventType Type;
|
public EventType Type;
|
||||||
public bool GetEventsNeedsRequest = true;
|
// 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
|
public enum EventType : int
|
||||||
{
|
{
|
||||||
|
|
|
@ -337,10 +337,11 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
if (req.PollServiceArgs.HasEvents(req.RequestID, req.PollServiceArgs.Id))
|
if (req.PollServiceArgs.HasEvents(req.RequestID, req.PollServiceArgs.Id))
|
||||||
{
|
{
|
||||||
string strreq = "";
|
string strreq = "";
|
||||||
if (req.PollServiceArgs.GetEventsNeedsRequest)
|
if (req.PollServiceArgs.GetEventsNeedsRequestBody)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
// should we try to seek back? fear we can't
|
||||||
str = new StreamReader(req.Request.Body);
|
str = new StreamReader(req.Request.Body);
|
||||||
strreq = str.ReadToEnd();
|
strreq = str.ReadToEnd();
|
||||||
str.Close();
|
str.Close();
|
||||||
|
|
|
@ -152,11 +152,6 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||||
|
|
||||||
public PollServiceTextureEventArgs(UUID pId, Scene scene) :
|
public PollServiceTextureEventArgs(UUID pId, Scene scene) :
|
||||||
base(null, null, null, null, pId, int.MaxValue)
|
base(null, null, null, null, pId, int.MaxValue)
|
||||||
// this should never timeout
|
|
||||||
// each request must be processed and return a response
|
|
||||||
// noevents can possible be use for nice shutdown, but not sure now
|
|
||||||
// the execution will provide a proper response even if it fails
|
|
||||||
|
|
||||||
{
|
{
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
|
|
||||||
|
@ -219,7 +214,6 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||||
UUID requestID = requestinfo.reqID;
|
UUID requestID = requestinfo.reqID;
|
||||||
|
|
||||||
// If the avatar is gone, don't bother to get the texture
|
// If the avatar is gone, don't bother to get the texture
|
||||||
|
|
||||||
if (m_scene.GetScenePresence(Id) == null)
|
if (m_scene.GetScenePresence(Id) == null)
|
||||||
{
|
{
|
||||||
response = new Hashtable();
|
response = new Hashtable();
|
||||||
|
@ -247,11 +241,9 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||||
string capUrl = "/CAPS/" + UUID.Random() + "/";
|
string capUrl = "/CAPS/" + UUID.Random() + "/";
|
||||||
|
|
||||||
// Register this as a poll service
|
// Register this as a poll service
|
||||||
// absurd large timeout to tune later to make a bit less than viewer
|
|
||||||
PollServiceTextureEventArgs args = new PollServiceTextureEventArgs(agentID, m_scene);
|
PollServiceTextureEventArgs args = new PollServiceTextureEventArgs(agentID, m_scene);
|
||||||
|
|
||||||
args.Type = PollServiceEventArgs.EventType.Texture;
|
args.Type = PollServiceEventArgs.EventType.Texture;
|
||||||
args.GetEventsNeedsRequest = false;
|
|
||||||
MainServer.Instance.AddPollServiceHTTPHandler(capUrl, args);
|
MainServer.Instance.AddPollServiceHTTPHandler(capUrl, args);
|
||||||
|
|
||||||
string hostName = m_scene.RegionInfo.ExternalHostName;
|
string hostName = m_scene.RegionInfo.ExternalHostName;
|
||||||
|
|
|
@ -223,7 +223,6 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||||
PollServiceInventoryEventArgs args = new PollServiceInventoryEventArgs(agentID);
|
PollServiceInventoryEventArgs args = new PollServiceInventoryEventArgs(agentID);
|
||||||
|
|
||||||
args.Type = PollServiceEventArgs.EventType.Inventory;
|
args.Type = PollServiceEventArgs.EventType.Inventory;
|
||||||
args.GetEventsNeedsRequest = false;
|
|
||||||
MainServer.Instance.AddPollServiceHTTPHandler(capUrl, args);
|
MainServer.Instance.AddPollServiceHTTPHandler(capUrl, args);
|
||||||
|
|
||||||
string hostName = m_scene.RegionInfo.ExternalHostName;
|
string hostName = m_scene.RegionInfo.ExternalHostName;
|
||||||
|
|
|
@ -186,7 +186,6 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
||||||
|
|
||||||
PollServiceEventArgs args = new PollServiceEventArgs(HttpRequestHandler, HasEvents, GetEvents, NoEvents, urlcode, 25000);
|
PollServiceEventArgs args = new PollServiceEventArgs(HttpRequestHandler, HasEvents, GetEvents, NoEvents, urlcode, 25000);
|
||||||
args.Type = PollServiceEventArgs.EventType.LslHttp;
|
args.Type = PollServiceEventArgs.EventType.LslHttp;
|
||||||
args.GetEventsNeedsRequest = false;
|
|
||||||
m_HttpServer.AddPollServiceHTTPHandler(uri, args);
|
m_HttpServer.AddPollServiceHTTPHandler(uri, args);
|
||||||
|
|
||||||
// m_log.DebugFormat(
|
// m_log.DebugFormat(
|
||||||
|
|
Loading…
Reference in New Issue