W3C home > Mailing lists > Public > www-lib@w3.org > April to June 1999

Re: Problems with the cache and the response object

From: Henrik Frystyk Nielsen <frystyk@w3.org>
Date: Wed, 28 Apr 1999 17:10:18 -0400
To: www-lib@w3.org
Message-ID: <3727793A.580F4FF1@w3.org>
To: jose.kahan@w3.org
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

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