[Zope-dev] request: FTP
Michel Pelletier
michel@digicool.com
Wed, 8 Dec 1999 20:31:26 -0500
> -----Original Message-----
> From: Ethan Fremen [mailto:mindlace@majordomo.net]
> Sent: Wednesday, December 08, 1999 6:20 PM
> To: Michel Pelletier
> Cc: zope-dev@zope.org
> Subject: Re: [Zope-dev] request: FTP
>
>
> Michel Pelletier wrote:
>
> > What happens though when the HTTP side of Zope supports
> multi-hosting
> > (as it will in 2.2) and the FTP side doesn't? When you
> start putting
> > protocol specific widgets at the application layer (which
> is supposed to
> > protocol independant) expect to be bitten somewhere, at some time.
>
> But isn't BASE/URL protocol dependant? i.e., should it not
> return just the path, and not http:// ?
Yep, yer right there. and I suspect there might be a future need for a
generalization, say, PATH that truely is protocol independent. I think
Jim is thinking really hard about this right now for particular problem
he has, 'upwards' and 'downwards' references between objects.
> That way, I could
> just say <a href="ftp://&dtml-url0">download this page</a>
> and everything would be hunky-dory, _assuming_ I'm not
> worried about multi-hosting.
Perhaps it could be abstracted out more than that. I dunno. Maybe we
could let ZPublisher build up URLs that accuratly reflect the protocol
used during the request.
I don't know if this is a good idea or not either, but maybe I've been
afraid to suggest some sort of application level variable that defines
the current request's protocol. We allready have quite a few that
define HTTP specific stuff...
I didn't intend my message to say that protocols shouldn't be taken into
account in the application but I guess that's what I said. If they are
taken into account, there should be a pretty well thought out way they
are presented to the application level logic (and at some degree maybe
even the DTML level).
-Michel
>
> On the subject of multi-hosting, shouldn't a FTP0 be
> intelligent enough to go where the file is actually hosted?
But FTP is a different medusa module than HTTP. They would both need to
be configured to work with multi-hosting. I think that the plan is,
down the road, we *might* put virtualhost support in ZServer's http
server (or, we could just leave that whole death pit for the apache
folks). I'm not sure if multi-hosting FTP is planned at the same time,
it does introduce a mighty interesting problem of configuration, we
might have to bring ourselve to have some sort of XML based
configuration *file*, which is something we've avoided completely,
having stuck with the command-line argument style of doing things.
However, there is a plus to a config file, if it's XML and parsable then
Zope itself (as an application) could be used to configure it's protocol
level components through a yet to be defined API.
>
> But doesn't BASE/URL violate what you're saying? or do I
> misunderstand how they work?
Nah I said it wrong.
> I just was writing how-tos for my clients, and had to write a
> lot of "hard" ftp urls. I suppose I can just do a "download"
> method where I do a Content-type: application/octet-stream
> and then call the related url.
In your method you can string.split(URL0, SCRIPT_NAME) and you'll get
just the path of the requested object. I've found that useful.
-Michel