Autorization core dump fix

I found the fix for core dump.

in HTNet.c free_net() we should not null Request's net 
if it has been changed by "After" filters.

It may not be equal 'net' passed as
input parameter and it can be needed for libwww later for example 
in case of redirection (HTTP status code 302).

PRIVATE BOOL free_net (HTNet * net)
{
    if (CORE_TRACE) HTTrace("Net Object.. Freeing object %p\n", net);
    if (net) {

/*!!!!!!!*/
	HTNet * new_net = HTRequest_net(net->request);
	if (new_net)
	    if (new_net == net)
	       HTRequest_setNet(net->request, NULL);
/*!!!!!!!*/

        HT_FREE(net);
	return YES;
    }
    return NO;
}

May be we even can throw away the lines between comments.
This requires additional testing but would be more nice and
logical.

Mikhail 

____________________________________________________________________
Get free e-mail and a permanent address at http://www.netaddress.com/?N=1

Received on Tuesday, 16 February 1999 15:32:16 UTC