[Mono-bugs] [Bug 504378] New: Routes in System.Web.Routing don't handle "Variable Number of Segments" correctly (Catchall)

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri May 15 13:59:06 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=504378


           Summary: Routes in System.Web.Routing don't handle "Variable
                    Number of Segments" correctly (Catchall)
    Classification: Mono
           Product: Mono: Class Libraries
           Version: SVN
          Platform: x86
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.Web
        AssignedTo: mhabersack at novell.com
        ReportedBy: amirshim at yahoo.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.10)
Gecko/2009042316 Firefox/3.0.10 (.NET CLR 3.5.30729)

For example, in asp.net MVC we could add a route like this:

routes.MapRoute(
       "Default",
       "{*id}",
       new { controller = "Home", action = "Index", id= "" }
    );

And if we have a route such as "a/b/c/d", it matches, but nothing gets mapped
to "id" (the entire route should).

See section "Handling a Variable Number of Segments"
http://msdn.microsoft.com/en-us/library/cc668201.aspx

Fix probably belongs in System.Web.Routing.UrlPattern



Reproducible: Always

Steps to Reproduce:
1. Create asp.net MVC project with one route (above)
2. Run under xsp2
3. run browser with url: http://localhost:8080/a/b/c/d
4. notice that HomeController.Index(string id) gets passed the wrong value for
id.
Actual Results:  
Empty string for id

Expected Results:  
string "a/b/c/d" for id

-- 
Configure bugmail: http://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