diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index ef61200..4532e76 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | |||
@@ -226,6 +226,15 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
226 | return true; | 226 | return true; |
227 | } | 227 | } |
228 | 228 | ||
229 | private void OnRequest(object source, RequestEventArgs args) | ||
230 | { | ||
231 | IHttpClientContext context = (IHttpClientContext)source; | ||
232 | IHttpRequest request = args.Request; | ||
233 | |||
234 | OnHandleRequestIOThread(context,request); | ||
235 | |||
236 | } | ||
237 | |||
229 | public void OnHandleRequestIOThread(IHttpClientContext context, IHttpRequest request) | 238 | public void OnHandleRequestIOThread(IHttpClientContext context, IHttpRequest request) |
230 | { | 239 | { |
231 | OSHttpRequest req = new OSHttpRequest(context, request); | 240 | OSHttpRequest req = new OSHttpRequest(context, request); |
@@ -1406,7 +1415,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1406 | { | 1415 | { |
1407 | //m_httpListener.Prefixes.Add("http://+:" + m_port + "/"); | 1416 | //m_httpListener.Prefixes.Add("http://+:" + m_port + "/"); |
1408 | //m_httpListener.Prefixes.Add("http://10.1.1.5:" + m_port + "/"); | 1417 | //m_httpListener.Prefixes.Add("http://10.1.1.5:" + m_port + "/"); |
1409 | m_httpListener2 = new CoolHTTPListener(m_listenIPAddress, (int)m_port); | 1418 | m_httpListener2 = CoolHTTPListener.Create(m_listenIPAddress, (int)m_port); |
1410 | m_httpListener2.ExceptionThrown += httpServerException; | 1419 | m_httpListener2.ExceptionThrown += httpServerException; |
1411 | m_httpListener2.LogWriter = httpserverlog; | 1420 | m_httpListener2.LogWriter = httpserverlog; |
1412 | 1421 | ||
@@ -1414,7 +1423,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1414 | // if you want more detailed trace information from the HttpServer | 1423 | // if you want more detailed trace information from the HttpServer |
1415 | //m_httpListener2.UseTraceLogs = true; | 1424 | //m_httpListener2.UseTraceLogs = true; |
1416 | 1425 | ||
1417 | m_httpListener2.DisconnectHandler = httpServerDisconnectMonitor; | 1426 | //m_httpListener2.DisconnectHandler = httpServerDisconnectMonitor; |
1418 | } | 1427 | } |
1419 | else | 1428 | else |
1420 | { | 1429 | { |
@@ -1422,7 +1431,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1422 | //m_httpListener.Prefixes.Add("http://+:" + m_port + "/"); | 1431 | //m_httpListener.Prefixes.Add("http://+:" + m_port + "/"); |
1423 | } | 1432 | } |
1424 | 1433 | ||
1425 | m_httpListener2.RequestHandler += OnHandleRequestIOThread; | 1434 | m_httpListener2.RequestReceived += OnRequest; |
1426 | //m_httpListener.Start(); | 1435 | //m_httpListener.Start(); |
1427 | m_httpListener2.Start(64); | 1436 | m_httpListener2.Start(64); |
1428 | HTTPDRunning = true; | 1437 | HTTPDRunning = true; |
@@ -1474,10 +1483,10 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1474 | { | 1483 | { |
1475 | HTTPDRunning = false; | 1484 | HTTPDRunning = false; |
1476 | m_httpListener2.ExceptionThrown -= httpServerException; | 1485 | m_httpListener2.ExceptionThrown -= httpServerException; |
1477 | m_httpListener2.DisconnectHandler = null; | 1486 | //m_httpListener2.DisconnectHandler = null; |
1478 | 1487 | ||
1479 | m_httpListener2.LogWriter = null; | 1488 | m_httpListener2.LogWriter = null; |
1480 | m_httpListener2.RequestHandler -= OnHandleRequestIOThread; | 1489 | m_httpListener2.RequestReceived -= OnRequest; |
1481 | 1490 | ||
1482 | m_httpListener2.Stop(); | 1491 | m_httpListener2.Stop(); |
1483 | } | 1492 | } |