diff options
Diffstat (limited to 'OpenSim/Framework/Servers/HttpServer/BaseRequestHandler.cs')
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/BaseRequestHandler.cs | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseRequestHandler.cs b/OpenSim/Framework/Servers/HttpServer/BaseRequestHandler.cs index 5ad4520..da4f9a8 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseRequestHandler.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseRequestHandler.cs | |||
@@ -58,14 +58,22 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
58 | 58 | ||
59 | public string GetParam(string path) | 59 | public string GetParam(string path) |
60 | { | 60 | { |
61 | try | 61 | if (CheckParam(path)) |
62 | { | 62 | { |
63 | return path.Substring(m_path.Length); | 63 | return path.Substring(m_path.Length); |
64 | } | 64 | } |
65 | catch (Exception) | 65 | |
66 | return String.Empty; | ||
67 | } | ||
68 | |||
69 | protected bool CheckParam(string path) | ||
70 | { | ||
71 | if(String.IsNullOrEmpty(path)) | ||
66 | { | 72 | { |
67 | return String.Empty; | 73 | return false; |
68 | } | 74 | } |
75 | |||
76 | return path.StartsWith(Path); | ||
69 | } | 77 | } |
70 | } | 78 | } |
71 | } | 79 | } |