--- libwww/Library/src/HTCache.c 1999/03/14 02:01:08 2.66 +++ libwww/Library/src/HTCache.c 1999/06/23 21:05:00 2.67 @@ -3,7 +3,7 @@ ** ** (c) COPYRIGHT MIT 1995. ** Please first read the full copyright statement in the file COPYRIGH. -** @(#) $Id: HTCache.c,v 2.66 1999/03/14 02:01:08 frystyk Exp $ +** @(#) $Id: HTCache.c,v 2.67 1999/06/23 21:05:00 frystyk Exp $ ** ** This modules manages the cache ** @@ -1366,9 +1366,16 @@ PRIVATE int HTCacheCheckFilter (HTReques HTParentAnchor * anchor = HTRequest_anchor(request); HTCache * cache = HTCache_find(anchor); if (cache) { - if (status == 204) + /* + ** If we receive a 204 and the method is unsafe then we have + ** to delete the cache body but not the header information + */ + if (status == 204) { HTCache_updateMeta(cache, request, response); - else + cache->size = 0; + cache->range = YES; + REMOVE(cache->cachename); + } else HTCache_remove(cache); } HTCache_touch(request, response, anchor);