[Mono-bugs] [Bug 667513] New: System.Web.Routing throws NotImplementedException when PathInfo is set
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed Jan 26 20:33:15 EST 2011
https://bugzilla.novell.com/show_bug.cgi?id=667513
https://bugzilla.novell.com/show_bug.cgi?id=667513#c0
Summary: System.Web.Routing throws NotImplementedException when
PathInfo is set
Classification: Mono
Product: Mono: Class Libraries
Version: 2.6.x
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Sys.Web
AssignedTo: mhabersack at novell.com
ReportedBy: bassam at symform.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13)
Gecko/20101203 Firefox/3.6.13 ( .NET CLR 3.5.30729; .NET4.0E)
System.Web.Routing throws NotImplementedException when the following URL is
requested through Apache/mod_mono "/File/Program Files/Apple Software
Update/SoftwareUpdate.Resources/Software Update.tiff"
Reproducible: Always
Steps to Reproduce:
Here is a small program that reproduces this. This runs correctly on .NET.
using System.Collections.Specialized;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
namespace MonoRoutingBug
{
class Program
{
static void Main(string[] args)
{
Route r = new Route("File/{*path}", new RouteValueDictionary(new {
controller = "File", action = "Retrieve" }), new MvcRouteHandler());
// The URL is "/File/Program Files/Apple Software
Update/SoftwareUpdate.Resources/Software Update.tiff"
// Apache and mod_mono seem to set
AppRelativeCurrentExecutionFilePath to "~/File/Program Files/Apple Software
Update/SoftwareUpdate.Resources"
// and the PathInfo to "/Software Update.tiff"
RouteData data = r.GetRouteData(new
DummyHttpContext("~/File/Program Files/Apple Software
Update/SoftwareUpdate.Resources", "/Software Update.tiff"));
// Expected : data = { controller = "File", action = "Retrieve",
path = "Program Files/Apple Software Update/SoftwareUpdate.Resources/Software
Update.tiff" }
// Actual: NotImplementedException is thrown
}
}
class DummyRouteHandler : IRouteHandler
{
public IHttpHandler GetHttpHandler(RequestContext requestContext)
{
return null;
}
}
class DummyHttpRequest: HttpRequestBase
{
private string path;
private string pathInfo;
public DummyHttpRequest(string path, string pathInfo)
{
this.path = path;
this.pathInfo = pathInfo;
}
public override string AppRelativeCurrentExecutionFilePath { get {
return path; } }
public override string PathInfo { get { return pathInfo; } }
public override string HttpMethod{ get { return "GET"; } }
public override NameValueCollection QueryString { get { return new
NameValueCollection(); } }
}
class DummyHttpContext : HttpContextBase
{
private DummyHttpRequest req;
public DummyHttpContext(string path, string pathInfo)
{
req = new DummyHttpRequest(path, pathInfo);
}
public override HttpRequestBase Request { get { return req; } }
}
}
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list