Hi Chris,

The choice made was not to match any delimiter character (gen-delims or
sub-delims). In your case, it is always possible to change the pattern to
"/place/{placeMain}+{placeSub}$".

The current URI Template draf doesn't specify how to parse an URI based on a
pattern, but I've submitted a related suggestion to the author, they may
consider it in a later release.

Best regards,
Jerome  

> -----Message d'origine-----
> De : Chris Grindstaff [mailto:[EMAIL PROTECTED] 
> Envoyé : vendredi 1 décembre 2006 22:30
> À : [email protected]
> Objet : URI Template patterns
> 
> Hello all,
> I have a question about the PatternScorer/URI Templates.
> 
> router.attach("/place/{place}$", new PlaceHandler());
> 
> this results in a pattern of
> /place/([a-zA-Z0-9\-\.\_\~]*)$
> 
> which does not match
> http://127.0.0.1:8182/place/foo+bar  
> 
> Should it?
> 
> In reading 
> http://bitworking.org/projects/URI-Templates/draft-gregorio-ur
> itemplate-00.html#variables
> and http://www.ietf.org/rfc/rfc3986.txt
> it's not 100% clear to me.
> 
> The BNF lists the + character as a sub-delims.
> 
> Thanks,
> Chris
> -- 
> Chris Grindstaff | http://gstaff.org

Reply via email to