W3C home > Mailing lists > Public > www-lib@w3.org > July to September 1999

Re: How to get a binary e.g. from an URL if another request-object exists ?

From: Vaclav Barta <vbar@comp.cz>
Date: Fri, 20 Aug 1999 18:58:23 +0000
Message-ID: <37BDA54F.5979992F@comp.cz>
To: www-lib@w3.org

Michael Maretzke wrote:
[snip problem I don't understand]
> 2) Is it possible to handle "redirects" in a <META>-
> tag in a easy way ? By this time we tried to call
> our parser several times, each time a "redirect"
> occured a call to the parser.
> An easier way ?
Just register redirection callback:

int HandleRedirect(HTRequest *request,
    HTResponse *response,
    void *param,
    int status)
    /* IsRedirectworthy is my function; mainly
	it refuses to follow chained redirects */
    if (!IsRedirectworthy(request))
	return HT_OK;
	return HTRedirectFilter(request, response,
		param, status);

/* somewhere at the beginning */
    HTNet_addAfter(HandleRedirect, "http://*", NULL,

This works for me, but as I come to think about it,
I probably tried it only on redirects in HTTP - I
just expect libwww to handle redirects in META tags
the same way... Let me know how it works.

I have a web spider, too!
Received on Friday, 20 August 1999 16:03:06 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:52 UTC