Re: Problems with the cache and the response object

jose.kahan@w3.org wrote:

> When reading a document from the cache, the metadata doesn't make it
> to the response object, because it's being erased here:
> 
> HTCache.c:meta_read ()
> 
> ........
> 
>             /* Send the data down the pipe */
>             status = (*target->isa->put_block)(target, buffer, status);
> 
>             /* Delete the response headers */
>             HTRequest_setResponse(request, NULL);
> 
> Later on, just before calling the after handlers, a new response object
> gets allocated thru a simple call to HTRequest_response. However, this
> object is empty and it's the one that's being sent to the after handlers
> (including my terminate_handler).
> 
> Is there any reason why the response header is being erased?
> 
> I do need to know the content type in my terminate_handler, but I don't
> want to pull it from the anchor object (where I can find it), unless it's
> necessary.

There is a reason but I don't remember what it is, could just be memory
leak. You can always get the media type from the anchor - the anchor
object inherits all the meta information from the response object.

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

Received on Wednesday, 28 April 1999 17:10:26 UTC