Re: Changing redirection filter in WWWLIB 4.1b3

Markku Savela writes:
> I in previous library versions, application had to provide the
> redirection filter. In 4.1b3, the standard library initialization (for
> example HTProfile_newClient) provides all the initialization and
> filters.
> The problem is that I want to use the standard initialization, but
> override the redirection handlers with my own, thus I tried the
> following
> 	HTNetCall_addAfter(myRedirectFilter, NULL, HT_TEMP_REDIRECT);
> 	HTNetCall_addAfter(myRedirectFilter, NULL, HT_PERM_REDIRECT);
> Unfortunately, it seems that above didn't have any effect. The library
> never seems to call my handlers. So, the next thing I attempt, is to
> delete all redirection handlers in a rather ugly way...
> 	while (HTNetCall_deleteAfter(HTRedirectFilter) == YES)
> 		/* Nothing */
> 	.. add my own..

Yes, this is not a nice API - you should of course be able to specify which 
status codes you want to be disable, I'll try and see if I can come up with 
something before the final release.

> However, I stopped trying this, because when looking at HTNet.c, I
> observed following suspicious code...
> PUBLIC BOOL HTNetCall_deleteAfter (HTNetCallback * cbf)
> {
>     return HTNetCall_delete(HTBefore, cbf);
> }
> Can that be right? Shouldn't it use 'HTAfter' there?

No, this is a cut-and-paste bug - it should be HTAfter, sorry.


Henrik Frystyk Nielsen, <>
World Wide Web Consortium, MIT/LCS NE43-356
545 Technology Square, Cambridge MA 02139, USA

Received on Thursday, 5 September 1996 12:42:07 UTC