(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.
This commit is contained in:
Dr Scofield
2008-05-19 18:30:25 +00:00
parent af46963176
commit 4b622ec881

View File

@@ -25,6 +25,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
namespace OpenSim.Framework.Servers
{
public class BaseRequestHandler
@@ -56,7 +58,14 @@ namespace OpenSim.Framework.Servers
protected string GetParam(string path)
{
return path.Substring(m_path.Length);
try
{
return path.Substring(m_path.Length);
}
catch (Exception)
{
return String.Empty;
}
}
}
}