Problem with response headers

Hi,
  I came across a strange problem with headers: when I try to get headers of a response sometimes they are NULL (but they are copied to the request's anchor) sometimes they are not NULL (and anchor does not contain headers). I tried to find the reason and found it in the following piece of code: file HTMIME.c, function pumpData. Here is the part:

/*
    **  Cache the metainformation in the anchor object by copying
    **  it from the response object. This we do regardless if
    **  we have a persistent cache or not as the memory cache will
    **  use it as well. If we are updating a cache entry using
    **  byte ranges then we already have the metainformation and
    **  hence we can ignore the new one as it'd better be the same.
    */
    if (!(me->mode & HT_MIME_PARTIAL) &&
	HTResponse_isCachable(me->response) != HT_NO_CACHE)
	HTAnchor_update(HTRequest_anchor(request), me->response);


The function HTAnchor_update takes header list from the response and sets it to NULL at the request.

The question is: why the headers are not copied to the anchor so that they can remain in the response? Is it bug? Or I've missed something?

Best regards,
Gregory.

Received on Thursday, 7 March 2002 03:37:23 UTC