[Opensim-dev] Uris: Errors/Inconsistencies/TBD
Stefan Andersson
stefan at tribalmedia.se
Tue Sep 9 08:20:13 UTC 2008
Just a quick one,
I don't have time to fix this up, and I guess we should discuss it first;
the issue is that parts of the code presumes url segments _ends_ with '/' and others they _begin_ with '/'
this leads to heavy confusion and easily done mistakes
now, the Uri class (which, together with UriBuilder, is poorly underused) ToString _appends_ an '/'
which I consider the proper behaviour: all segments appends an '/' to show they represent a hierarchy node.
I've already made the inventoryUrl wrapping an Uri to safeguard against missing trailing '/' in the ini, which is/was one of our most common mistakes, it seems. (and a bloody easy one at that)
Now, for example, the REST code, presumes the opposite
which means we can't combine the output of a Uri with the output from the RestClient.
So I can't wrap the asset url the same way.
Which sucks.
Either way, I suggest we use postfix notation in accordance with Uri class standard, but most of all I would want us to harmonize on one or the other.
Discussions?
/Stefan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20080909/944c5b6a/attachment-0001.html>
More information about the Opensim-dev
mailing list