Re: Getting the right content type for cached objects

Thorsten, 

If this may still be useful...

I just commited a patch to libwww that fixes the problem. Here's
the changelog entry:
===
        * Bug fix: When objects were retrieved from the cache, the
          response object didn't have a copy of the request headers.
          These headers were only found in the anchor associated to
          the request. In order to make a coherent behavior, I made
          a new function HTMIME.c:HTMIME_anchor2response() that copies
          the headers from one object to the other. Well, more than a
          copy, it adds a link to the headers. I call this function in
          HTCache:CacheCleanup when it succesfully retrieved an object
          from the cache. Result, you can now use the response object
          in both cases.
===

It works ok as far as I can tell. It may need some tweaking, so if you
use it and it doesn't work, write again to the list.

In all cases, it solves my Amaya problem.

Better function names than HTMIME_anchor2response() are welcome too :)

-jose

Received on Wednesday, 13 December 2000 12:23:27 UTC