Re: lrequest() routine.. (Retrieves redirected documents)

Roy T. Fielding (fielding@simplon.ICS.UCI.EDU)
Sun, 31 Jul 1994 01:18:17 -0700


Brooks said (speaking of the new www'lrequest() routine:

> later I realized the interface should be like the following..
> 
>     local($method, *url, *headers, *content, $timeout) = @_;
> 
> (passing url as a pointer rather than a url)..
> 
> I didn't want to deviate from the &request interface, but if a URL is
> redirected to a new URL, the program should know the new URL..
> 
> Consider Mosaic - when it gets a location redirect, it prints the new
> URL above the document... (this is why I need the new URL)..

Yep, I have added it to www.pl with that interface.  I also added an
internal limit of 10 redirects so that an infinite loop won't occur
within the library if someone messes up the redirect (or creates a
black hole on purpose).

BTW, Mosaic will gleefully pursue a redirect black hole until the cows
come home.  In case you are wondering, a black hole can be created on
an NCSA httpd server with the following SRM directive:

Redirect /Test/black-hole.ps http://my.server/Test/black-hole.ps.gz

(I know, because I tried to do that myself when I compressed some files
 to save my server's disk space).


....Roy Fielding   ICS Grad Student, University of California, Irvine  USA
                   (fielding@ics.uci.edu)
    <A HREF="http://www.ics.uci.edu/dir/grad/Software/fielding">About Roy</A>