Re: link indirection

Rick Troth <>
Date: Wed, 4 May 1994 18:35:27 +0200
Message-id: <>
Precedence: bulk
From: Rick Troth <>
To: Multiple recipients of list <>
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 -> 
			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 <>, Rice University, Information Systems