(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.
0.6.0-stable
Dr Scofield 2008-05-19 18:30:25 +00:00
parent af46963176
commit 4b622ec881
1 changed files with 10 additions and 1 deletions

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;
}
}
}
}