aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/BaseHttpServer.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Servers/BaseHttpServer.cs13
1 files changed, 13 insertions, 0 deletions
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs
index 7e8130a..3d125fb 100644
--- a/OpenSim/Framework/Servers/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/BaseHttpServer.cs
@@ -54,6 +54,7 @@ namespace OpenSim.Framework.Servers
54 protected HttpListener m_httpListener; 54 protected HttpListener m_httpListener;
55 protected CoolHTTPListener m_httpListener2; 55 protected CoolHTTPListener m_httpListener2;
56 protected Dictionary<string, XmlRpcMethod> m_rpcHandlers = new Dictionary<string, XmlRpcMethod>(); 56 protected Dictionary<string, XmlRpcMethod> m_rpcHandlers = new Dictionary<string, XmlRpcMethod>();
57 protected Dictionary<string, bool> m_rpcHandlersKeepAlive = new Dictionary<string, bool>();
57 protected DefaultLLSDMethod m_defaultLlsdHandler = null; // <-- Moving away from the monolithic.. and going to /registered/ 58 protected DefaultLLSDMethod m_defaultLlsdHandler = null; // <-- Moving away from the monolithic.. and going to /registered/
58 protected Dictionary<string, LLSDMethod> m_llsdHandlers = new Dictionary<string, LLSDMethod>(); 59 protected Dictionary<string, LLSDMethod> m_llsdHandlers = new Dictionary<string, LLSDMethod>();
59 protected Dictionary<string, IRequestHandler> m_streamHandlers = new Dictionary<string, IRequestHandler>(); 60 protected Dictionary<string, IRequestHandler> m_streamHandlers = new Dictionary<string, IRequestHandler>();
@@ -141,6 +142,17 @@ namespace OpenSim.Framework.Servers
141 lock (m_rpcHandlers) 142 lock (m_rpcHandlers)
142 { 143 {
143 m_rpcHandlers[method] = handler; 144 m_rpcHandlers[method] = handler;
145 m_rpcHandlersKeepAlive[method] = true; // default
146 return true;
147 }
148 }
149
150 public bool AddXmlRPCHandler(string method, XmlRpcMethod handler, bool keepAlive)
151 {
152 lock (m_rpcHandlers)
153 {
154 m_rpcHandlers[method] = handler;
155 m_rpcHandlersKeepAlive[method] = keepAlive; // default
144 return true; 156 return true;
145 } 157 }
146 } 158 }
@@ -584,6 +596,7 @@ namespace OpenSim.Framework.Servers
584 } 596 }
585 597
586 responseString = XmlRpcResponseSerializer.Singleton.Serialize(xmlRpcResponse); 598 responseString = XmlRpcResponseSerializer.Singleton.Serialize(xmlRpcResponse);
599 response.KeepAlive = m_rpcHandlersKeepAlive[methodName];
587 } 600 }
588 else 601 else
589 { 602 {