aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs11
1 files changed, 8 insertions, 3 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index 7041181..e4a244e 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -857,6 +857,8 @@ namespace OpenSim.Framework.Servers.HttpServer
857 } 857 }
858 } 858 }
859 859
860 private readonly string HANDLER_SEPARATORS = "/?&#";
861
860 private bool TryGetStreamHandler(string handlerKey, out IRequestHandler streamHandler) 862 private bool TryGetStreamHandler(string handlerKey, out IRequestHandler streamHandler)
861 { 863 {
862 string bestMatch = null; 864 string bestMatch = null;
@@ -865,7 +867,8 @@ namespace OpenSim.Framework.Servers.HttpServer
865 { 867 {
866 foreach (string pattern in m_streamHandlers.Keys) 868 foreach (string pattern in m_streamHandlers.Keys)
867 { 869 {
868 if (handlerKey.StartsWith(pattern)) 870 if ((handlerKey == pattern)
871 || (handlerKey.StartsWith(pattern) && (HANDLER_SEPARATORS.IndexOf(handlerKey[pattern.Length]) >= 0)))
869 { 872 {
870 if (String.IsNullOrEmpty(bestMatch) || pattern.Length > bestMatch.Length) 873 if (String.IsNullOrEmpty(bestMatch) || pattern.Length > bestMatch.Length)
871 { 874 {
@@ -895,7 +898,8 @@ namespace OpenSim.Framework.Servers.HttpServer
895 { 898 {
896 foreach (string pattern in m_pollHandlers.Keys) 899 foreach (string pattern in m_pollHandlers.Keys)
897 { 900 {
898 if (handlerKey.StartsWith(pattern)) 901 if ((handlerKey == pattern)
902 || (handlerKey.StartsWith(pattern) && (HANDLER_SEPARATORS.IndexOf(handlerKey[pattern.Length]) >= 0)))
899 { 903 {
900 if (String.IsNullOrEmpty(bestMatch) || pattern.Length > bestMatch.Length) 904 if (String.IsNullOrEmpty(bestMatch) || pattern.Length > bestMatch.Length)
901 { 905 {
@@ -927,7 +931,8 @@ namespace OpenSim.Framework.Servers.HttpServer
927 { 931 {
928 foreach (string pattern in m_HTTPHandlers.Keys) 932 foreach (string pattern in m_HTTPHandlers.Keys)
929 { 933 {
930 if (handlerKey.StartsWith(pattern)) 934 if ((handlerKey == pattern)
935 || (handlerKey.StartsWith(pattern) && (HANDLER_SEPARATORS.IndexOf(handlerKey[pattern.Length]) >= 0)))
931 { 936 {
932 if (String.IsNullOrEmpty(bestMatch) || pattern.Length > bestMatch.Length) 937 if (String.IsNullOrEmpty(bestMatch) || pattern.Length > bestMatch.Length)
933 { 938 {