Hi Robert,

On 4/6/09 6:26 PM, Robert Osfield wrote:
On Thu, Jun 4, 2009 at 5:13 PM, Ulrich Hertlein<[email protected]>  wrote:
Good point, I thought they only look at filenames like .earth

They do, but their plugin still hasn't be called first.

Ah, so for things like http://www.foo.com/flat.earth you mean?  Or do they need 
to be
called for things like .ive and .png as well?
(It works for local files.)

Could we iterate over all plugins that support the protocol in question, with 
the
CURL plugin being the last resort?

This might be something that we could do to change the order to push filenames 
with
protocols to be searched in plugins that support that protocol first.

Yes, I was thinking the same thing:
if (url) {
   find plugin that supports the given protocol and the given extension
   if (found) {
      try that plugin
   }
   if (failed) {
      try curl
   }
} else {

   find plugin for given extension
   do filename/filepath magic with that plugin
}

The problem is that the stripping of the filepath is done before the libcurl 
plugin
gets a lookin, so the file gets found locally.
...
The current search path mechanism
actually only understand local files, it can't check remote files so one 
possible could
interpret this at don't even attempt to do any searching.

Yes, this is why I moved the CURL test before the rest of the plugins.
But I agree that these two cases (URL vs. local file) shouldn't be both tested 
at all.

If it's a remote file and no one is able to handle it it doesn't make sense to try locally - even if a file is found it's probably not the right one.

Cheers
/ulrich
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to