Re: link indirection

Rick Troth <troth@rice.edu>
Errors-To: listmaster@www0.cern.ch
Date: Wed, 4 May 1994 18:35:27 +0200
Errors-To: listmaster@www0.cern.ch
Message-id: <Pine.3.89.9405041006.A26901-0100000@brazos.is.rice.edu>
Errors-To: listmaster@www0.cern.ch
Reply-To: troth@rice.edu
Originator: www-talk@info.cern.ch
Sender: www-talk@www0.cern.ch
Precedence: bulk
From: Rick Troth <troth@rice.edu>
To: Multiple recipients of list <www-talk@www0.cern.ch>
Subject: Re: link indirection
X-Listprocessor-Version: 6.0c -- ListProcessor by Anastasios Kotsikonas
Content-Type: TEXT/PLAIN; charset=US-ASCII
Content-Type: TEXT/PLAIN; charset=US-ASCII
Mime-Version: 1.0
Mime-Version: 1.0
> I have a program that runs as an httpd script and produces html from
> database accesses. I would like to add a redirection capability that
> would allow it to generate an URL, pass it to the appropriate server,
> and relay the results back to its own client. To do this I presumably
> have to embed the minimal httpd client functionality of URL-resolving
> into my code.  I looked at Mosaic-2.4, and libwww2/HTTP.c seems to be
> the relevant piece, ... 
 
	A couple of months ago,  I cooked-up a gem I call 'webcat'. 
This would do exactly what you want,  though ... uh ... I hadn't planned 
on giving it out anytime soon.   It doesn't use libwww,  and should! 
The idea was that any number of scripts could use this same thing 
to get stuff off the web. 
 
> Thanks. -Stan
 
	Webcat has another feature which I've wanted to mention 
for quite some time and never gotten around to:   The argument passed 
is treated as a local filename first,  webcat tries to open the object 
with open().   If that fails,  then webcat tries a readlink(). 
The result of readlink(), or argv[1] itself, is passed to the webbish 
parts of the code.   The idea is that you can have a sym-link like: 
 
		riceinfo -> http://riceinfo.rice.edu/ 
 
			and webcat will follow it. 
 
	This has interesting implications for all applications. 
If this trick were incorporated into a common open() used by other 
ordinarily local apps,  think of it!   Suddenly GNU EMACS and vi 
are both WWW editors  (almost). 
 
-- 
Rick Troth <troth@rice.edu>, Rice University, Information Systems