although the spec says that resourcePathName is the last segment in the uri, the spec is wrong
there are discussions on how to change the spec regarding this, and quite probably it is going to be the last segment in the URL that is not variable (basically, it should not contain "{}")
I already have this last option implemented, I just not pushed it because the discussion is still going on in the spec forums.
:-1: nope, several things: