(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
parent
af46963176
commit
4b622ec881
|
@ -25,6 +25,8 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
|
||||
namespace OpenSim.Framework.Servers
|
||||
{
|
||||
public class BaseRequestHandler
|
||||
|
@ -55,8 +57,15 @@ namespace OpenSim.Framework.Servers
|
|||
}
|
||||
|
||||
protected string GetParam(string path)
|
||||
{
|
||||
try
|
||||
{
|
||||
return path.Substring(m_path.Length);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return String.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue