[Mono-bugs] [Bug 693996] New: UriTemplate doesn't support named wildcards

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon May 16 07:11:05 EDT 2011


https://bugzilla.novell.com/show_bug.cgi?id=693996

https://bugzilla.novell.com/show_bug.cgi?id=693996#c0


           Summary: UriTemplate doesn't support named wildcards
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.6.x
          Platform: 64bit
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: WCF
        AssignedTo: atsushi at ximian.com
        ReportedBy: davidstrawbridge at golfstrike.co.uk
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Created an attachment (id=429745)
 --> (http://bugzilla.novell.com/attachment.cgi?id=429745)
Test program

User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:6.0a1) Gecko/20110515
Firefox/6.0a1

Compiled code which runs under Microsoft.NET which has a UriTemplate with a
named wildcard segment.
Under Mono on Ubuntu, this throws a System.FormatException: Wildcard in
UriTemplate is valid only if it is placed at the last part of the path:
'{*path}'

Admittedly, this is not really documented by Microsoft, but they do support it,
and it allows access to the wildcard path via the
UriTemplateMatch.BoundVariables, and also enables WCF methods to have named
wildcard parameters.


Reproducible: Always

Steps to Reproduce:
1. Build attached test program (need reference to System.ServiceModel.Web.dll)
2. Run program - exception is thrown

Actual Results:  
Unhandled Exception: System.FormatException: Wildcard in UriTemplate is valid
only if it is placed at the last part of the path: '{*path}'
  at System.UriTemplate.ParsePathTemplate (System.String template, Int32 index,
Int32 end) [0x00000] in <filename unknown>:0 
  at System.UriTemplate..ctor (System.String template, Boolean
ignoreTrailingSlash, IDictionary`2 additionalDefaults) [0x00000] in <filename
unknown>:0 
  at System.UriTemplate..ctor (System.String template, Boolean
ignoreTrailingSlash) [0x00000] in <filename unknown>:0 
  at System.UriTemplate..ctor (System.String template) [0x00000] in <filename
unknown>:0 
  at uritemplatewildcardbug.MainClass.Main (System.String[] args) [0x00000] in
<filename unknown>:0 


Expected Results:  
Under MS .NET, the output is (as expected)

Match, path='something'

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