commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario Ivankovits <ma...@ops.co.at>
Subject [vfs] Re: Specifying options to FTP etc..
Date Thu, 30 Aug 2007 08:03:48 GMT
Hi! 
> I don't quite agree with this - this may be the common case for HTTP,
> but the URI spec does not enforce it.
Ok, but how should we differentiate between these both use-cases?

If we would like to allow this style of URL we need some special
delimiter to know what to pass to VFS as configuration and what to pass
further to the server.
And no - I don't want to care if we are using the HTTP or any other scheme.

Hmmm ..... what we can do might be something like this.

We add a new resolveFile method to the FileSystemManager interface:
FileObject resolveFileWithUrlConfiguration(String uri)

and we separate the VFS configuration using the double question-mark (??)

A url like:
http://www/path/cgi-bin/send.pl?FILE=ABC&TYPE=PDF??proxyHost=proxy.host&proxyPort=8080

will work then.

resolveFileWithUrlConfiguration will strip the part after (including) ??
and create the FileSystemOption stuff (if possible) which means the vfs
configuration string will not be shown in the filename.

Then
FileObject fo = manager.resolveFileWithUrlConfiguration(....);
FileObject fo2 =
manager.resolveFileWithUrlConfiguration(fo.getName().toString);

will not use the same filesystem configuration.

This limitation makes it look a little bit hacky - we might remove this
limitation later.


What do you think?

Ciao,
Mario


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message