--------------------- PatchSet 2433 Date: 2001/05/31 15:17:49 Author: hno Branch: etag Tag: (none) Log: Some minor bug fixes of If-Match and If-None-Match Members: src/client_side.c:1.29.2.7->1.29.2.8 Index: squid/src/client_side.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/client_side.c,v retrieving revision 1.29.2.7 retrieving revision 1.29.2.8 diff -u -r1.29.2.7 -r1.29.2.8 --- squid/src/client_side.c 31 May 2001 15:02:43 -0000 1.29.2.7 +++ squid/src/client_side.c 31 May 2001 15:17:49 -0000 1.29.2.8 @@ -1,6 +1,6 @@ /* - * $Id: client_side.c,v 1.29.2.7 2001/05/31 15:02:43 hno Exp $ + * $Id: client_side.c,v 1.29.2.8 2001/05/31 15:17:49 hno Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -1686,7 +1686,7 @@ #endif if (httpHeaderHas(&r->header, HDR_IF_MATCH)) { String req_etags; - const char *rep_etag = httpHeaderGetStr(&r->header, HDR_ETAG); + const char *rep_etag = httpHeaderGetStr(&e->mem_obj->reply->header, HDR_ETAG); int has_etag; if (!rep_etag) { /* The cached object does not have a entity tag. This cannot @@ -1757,7 +1757,7 @@ } if (httpHeaderHas(&r->header, HDR_IF_NONE_MATCH)) { String req_etags; - const char *rep_etag = httpHeaderGetStr(&r->header, HDR_ETAG); + const char *rep_etag = httpHeaderGetStr(&e->mem_obj->reply->header, HDR_ETAG); int has_etag; if (mem->reply->sline.status != HTTP_OK) { debug(33, 4) ("clientCacheHit: Reply code %d != 200\n", @@ -1782,9 +1782,10 @@ stringClean(&req_etags); if (has_etag) { http->log_type = LOG_TCP_IMS_HIT; + is_modified = 0; } } - if (r->flags.ims) { + if (is_modified != 0 && r->flags.ims) { /* * Handle If-Modified-Since requests from the client */