Hi Ulrich, I'm aware of this issue but re-order the call to the CURL plugin so it goes before other plugins will break other NodeKits such as osgEarth as they rely upon their own plugins catching http calls.
By coincidence I had exactly the same problem as you with a local file being picked up instead of the remote one. My quick workaround in this case was to add .curl to the filename to force it to be passed the curl plugin and bypassed by other plugins. A full solution has to be changing the search mechanism so that it doesn't strip the full path from the front of the file when doing it's searching of the OSG_FILE_PATH list, however, such a change would break apps that rely upon this for searching for files. For instance if you have a texture with filename subdirectory/image.jpg but on disk the file is in MyDirectory/image.jpg, then unless the is the option to strip the path you won't ever be able to find the file even if your point OSG_FILE_PATH at the directory. To get round this problem I though perhaps we could add an exception to the file path search scheme that makes it reject trying to search for files that have a server path in them. Thoughts? Robert. On Thu, Jun 4, 2009 at 4:33 PM, Ulrich Hertlein <[email protected]> wrote: > Hi Robert, > > imagine the following situation: > - there is a file earth.ive somewhere in the search path > - run "osgviewer http://www.openscenegraph.org/data/earth_bayarea/earth.ive" > > What will happen is that the local file earth.ive is loaded instead of the > URL. > IMHO this is a bug. > > The bug is caused by the behaviour of osgDB::Registry::read(const > ReadFunctor& readFunctor). > > What this does is (at each step returning if successful): > - check if the filename is an archive; if yes, load it > - check if the filename can be loaded with one of the existing plugins > - load the proper library for filename and try that > - if that fails and the filename is a URL, try the CURL plugin > > What it *should* do to work properly is the following: > - (check if the filename is an archive; if yes, load it) > - if the filename is a URL, try the CURL plugin > - find (load if necessary) the proper library for filename and try that > > About the archives I'm not sure. Strictly speaking they too should be > checked after the URL check but I'm not sure to what extent they support > being streamed. > > Attached is a patch that implements the outlined behaviour. > I've checked it with the earth.ive online database (with and without local > 'earth.ive' file present), a local .osga paged database, and various other > models, also in combination (for example with the online database and the > local database side-by-side). > > Please have a look and tell me what you think. > Cheers, > /ulrich > > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > > _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
