[undertow-dev] Consider a PathHandler's URL as the full one, not as a prefix

Stuart Douglas sdouglas at redhat.com
Mon Dec 9 05:35:12 EST 2013


> Hello,
> 
> When a URL is passed to PathHandler#addPath(String url, …) , it is considered
> as a URL prefix. Which means one can set the URL to “/foo” and can reach
> “/foo/bar” too.

I just implemented this in Undertow upstream, it should be available in the next release. 

Basically instead of addPath you now have addPrefixPath and addExactPath, with addPath now being a deprecated version of addPrefixPath.

I also added another path handler called PathTemplateHandler, that matches based on RFC 6570 level one URI templates, so you can do things like:

addPath("/setting/{username}/account")


Stuart



> 
> Is there any way to avoid this?
> Thanks.
> 
> Samy
> 
> _______________________________________________
> undertow-dev mailing list
> undertow-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/undertow-dev



More information about the undertow-dev mailing list