--------------------- PatchSet 1467 Date: 2005/06/18 21:42:15 Author: nlewycky Branch: prefetching Tag: milestone1 Log: Reorder tests so that the expensive and unrewarding cache miss test follows the is-HTML test. Added is 200-OK test. Members: src/client_side_reply.cc:1.57.2.4->1.57.2.5 Index: squid3/src/client_side_reply.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/client_side_reply.cc,v retrieving revision 1.57.2.4 retrieving revision 1.57.2.5 diff -u -r1.57.2.4 -r1.57.2.5 --- squid3/src/client_side_reply.cc 8 Jun 2005 21:52:53 -0000 1.57.2.4 +++ squid3/src/client_side_reply.cc 18 Jun 2005 21:42:15 -0000 1.57.2.5 @@ -1,6 +1,6 @@ /* - * $Id: client_side_reply.cc,v 1.57.2.4 2005/06/08 21:52:53 nlewycky Exp $ + * $Id: client_side_reply.cc,v 1.57.2.5 2005/06/18 21:42:15 nlewycky Exp $ * * DEBUG: section 88 Client-side Reply Routines * AUTHOR: Robert Collins (Originally Duane Wessels in client_side.c) @@ -1926,14 +1926,15 @@ #if USE_HTMLPREFETCH if (Config.onoff.htmlPrefetch) { - const String content_type = http->storeEntry()->getReply()->content_type; + const HttpReply *reply = http->storeEntry()->getReply(); + const String content_type = reply->content_type; - if (!logTypeIsATcpHit(http->logType) && - content_type.buf() && + if (content_type.buf() && (content_type.caseCmp("text/html") == 0 || content_type.caseCmp("application/xhtml+xml") == 0) && - !httpHeaderHas(&http->storeEntry()->getReply()->header, - HDR_CONTENT_ENCODING) && + !httpHeaderHas(&reply->header, HDR_CONTENT_ENCODING) && + !logTypeIsATcpHit(http->logType) && + reply->sline.status == HTTP_OK && !http->request->range && http->request->recursion_depth < 5) { HTMLAnalysisStream *htmlas = new HTMLAnalysisStream(http->request); clientStreamInsertHead(&http->client_stream, htmlStreamRead,