The REST URLs need to use partial matching, however, current
semantics are broken.

Without partial matching, URLS like /assets/782911..... would not
work. the issue here is that it should match whole URL parts, not
partial URL parts. Matching partial words as it does now seems like
someone was cutting corners, it's not by design.

/assets/ should match /assets/9887234...... but not /assets_exist.
The slash is the differentiator and partial compares of URL string
prefixes should be done by full-string matches of slash/delimited
parts, not prefix matching of the entire URL.


On 01/04/2014 15:00, Oren Hurvitz wrote:
> I tried to add a REST handler at the endpoint "/assets_exist". It turns out
> that I can't do that, because REST handlers are searched using partial
> string matches, so servers that don't implement the new handler will
> mistakenly choose the "/assets" endpoint instead.
> For now, I solved the problem by using a different endpoint:
> "/get_assets_exist".
> For the future, I think that this should be changed so that only full string
> matches work. Otherwise each time a new handler is added it will have to
> find an endpoint name that isn't a prefix of any current endpoint -- a
> difficult and error-prone task. Before I do that, does anyone know of
> endpoints that rely on the current behavior (partial string matches)?
> --
> View this message in context: 
> Sent from the opensim-dev mailing list archive at
> _______________________________________________
> Opensim-dev mailing list
Opensim-dev mailing list

Reply via email to