Hi Jason, On 5/6/09 1:30 AM, Jason Beverage wrote:
My workaround in both projects was to add a prefix to the server based URL's like "server:http://www.server.com/test.earth". This caused the CURL plugin to be bypassed b/c it didn't realize it was a URL and the Earth plugin could investigate it, remove the prefix and download the .earth file itself. ... I still think it is very useful to let plugins have the first chance at dealing with all filenames rather than assume the CURL plugin should be used for all server requests so that you have more flexibility especially when integrating with 3rd party libs that handle all the fun networking stuff for you :)
Agreed. This is why I was proposing to (for a URL) try all plugins that support the given protocol. If none of them are able/willing to handle the URL only then do we try the CURL plugin.
So for example if the osgEarth plugin registers for extension '.earth' and supports protocol 'http' then it would always be used for that combination.
It makes sense to me that if the filename contain's a server path that no local searching should be done within the OSG_FILE_PATH. Would that just be a simple check in osgDB:;findDataFile to simply return the filename if the incoming file is a URL or is there more places that need tweaking?
Wouldn't it make more sense to return an empty string (or false, or an exception) if the filename is a URL? The caller needs to know that this isn't a valid filename.
Cheers, /ulrich _______________________________________________ osg-submissions mailing list osg-submissions@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org