- From: Vaclav Barta <vbar@comp.cz>
- Date: Fri, 20 Aug 1999 18:58:23 +0000
- To: www-lib@w3.org
Hi, 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; else return HTRedirectFilter(request, response, param, status); } /* somewhere at the beginning */ HTNet_addAfter(HandleRedirect, "http://*", NULL, HT_PERM_REDIRECT, HT_FILTER_LATE); 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. Bye Vasek -- I have a web spider, too! http://www.locus.cz/linkcheck/
Received on Friday, 20 August 1999 16:03:06 UTC