diff options
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/Servers/BaseHttpServer.cs | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs index 18b53b1..efa71f2 100644 --- a/OpenSim/Framework/Servers/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/BaseHttpServer.cs | |||
@@ -180,7 +180,7 @@ namespace OpenSim.Framework.Servers | |||
180 | /// | 180 | /// |
181 | /// http://<hostname>:<port><method> | 181 | /// http://<hostname>:<port><method> |
182 | /// | 182 | /// |
183 | /// if the method starts with a slash. For example, AddHTTPHandler("/object/", ...) on a standalone region | 183 | /// if the method name starts with a slash. For example, AddHTTPHandler("/object/", ...) on a standalone region |
184 | /// server will register a handler that can be invoked with either | 184 | /// server will register a handler that can be invoked with either |
185 | /// | 185 | /// |
186 | /// http://localhost:9000/?method=/object/ | 186 | /// http://localhost:9000/?method=/object/ |
@@ -1504,15 +1504,23 @@ namespace OpenSim.Framework.Servers | |||
1504 | lock (m_streamHandlers) m_streamHandlers.Remove(handlerKey); | 1504 | lock (m_streamHandlers) m_streamHandlers.Remove(handlerKey); |
1505 | } | 1505 | } |
1506 | 1506 | ||
1507 | /// <summary> | ||
1508 | /// Remove an HTTP handler | ||
1509 | /// </summary> | ||
1510 | /// <param name="httpMethod"></param> | ||
1511 | /// <param name="path"></param> | ||
1507 | public void RemoveHTTPHandler(string httpMethod, string path) | 1512 | public void RemoveHTTPHandler(string httpMethod, string path) |
1508 | { | 1513 | { |
1509 | if (httpMethod != null && httpMethod.Length == 0) | 1514 | lock (m_HTTPHandlers) |
1510 | { | 1515 | { |
1511 | m_HTTPHandlers.Remove(path); | 1516 | if (httpMethod != null && httpMethod.Length == 0) |
1512 | return; | 1517 | { |
1518 | m_HTTPHandlers.Remove(path); | ||
1519 | return; | ||
1520 | } | ||
1521 | |||
1522 | m_HTTPHandlers.Remove(GetHandlerKey(httpMethod, path)); | ||
1513 | } | 1523 | } |
1514 | |||
1515 | m_HTTPHandlers.Remove(GetHandlerKey(httpMethod, path)); | ||
1516 | } | 1524 | } |
1517 | 1525 | ||
1518 | /// <summary> | 1526 | /// <summary> |
@@ -1540,7 +1548,6 @@ namespace OpenSim.Framework.Servers | |||
1540 | 1548 | ||
1541 | public bool RemoveLLSDHandler(string path, LLSDMethod handler) | 1549 | public bool RemoveLLSDHandler(string path, LLSDMethod handler) |
1542 | { | 1550 | { |
1543 | |||
1544 | try | 1551 | try |
1545 | { | 1552 | { |
1546 | if (handler == m_llsdHandlers[path]) | 1553 | if (handler == m_llsdHandlers[path]) |