aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDr Scofield2008-05-19 18:30:25 +0000
committerDr Scofield2008-05-19 18:30:25 +0000
commit4b622ec8815cb7de37db701aa33b693120263fe0 (patch)
tree097616834050ae63f91e26d3fd6e053161ea7de2
parenti'm dropping VerifyGod() and adding IsGod(OSHttpRequest) instead, which actua... (diff)
downloadopensim-SC_OLD-4b622ec8815cb7de37db701aa33b693120263fe0.zip
opensim-SC_OLD-4b622ec8815cb7de37db701aa33b693120263fe0.tar.gz
opensim-SC_OLD-4b622ec8815cb7de37db701aa33b693120263fe0.tar.bz2
opensim-SC_OLD-4b622ec8815cb7de37db701aa33b693120263fe0.tar.xz
(from awebb)
Fixes a bug in BaseRequestHandler. If the length of the patter is equal to, or greater than, the length of the actual request path, then an exception is thrown. System using is added to support use of String.Empty. Exception is used to ensure most efficient operation on (assumed to be most common) successful case.
-rw-r--r--OpenSim/Framework/Servers/BaseRequestHandler.cs11
1 files changed, 10 insertions, 1 deletions
diff --git a/OpenSim/Framework/Servers/BaseRequestHandler.cs b/OpenSim/Framework/Servers/BaseRequestHandler.cs
index f9f2d8f..ddc8e92 100644
--- a/OpenSim/Framework/Servers/BaseRequestHandler.cs
+++ b/OpenSim/Framework/Servers/BaseRequestHandler.cs
@@ -25,6 +25,8 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System;
29
28namespace OpenSim.Framework.Servers 30namespace OpenSim.Framework.Servers
29{ 31{
30 public class BaseRequestHandler 32 public class BaseRequestHandler
@@ -56,7 +58,14 @@ namespace OpenSim.Framework.Servers
56 58
57 protected string GetParam(string path) 59 protected string GetParam(string path)
58 { 60 {
59 return path.Substring(m_path.Length); 61 try
62 {
63 return path.Substring(m_path.Length);
64 }
65 catch (Exception)
66 {
67 return String.Empty;
68 }
60 } 69 }
61 } 70 }
62} 71}