--------------------- PatchSet 4878 Date: 2002/09/05 13:12:12 Author: rbcollins Branch: rfc2616 Tag: (none) Log: update before we use the reply! Vary is currently broken, but all other http routines seem ok Members: src/http.c:1.21.6.4->1.21.6.5 Index: squid/src/http.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/http.c,v retrieving revision 1.21.6.4 retrieving revision 1.21.6.5 diff -u -r1.21.6.4 -r1.21.6.5 --- squid/src/http.c 5 Sep 2002 12:39:24 -0000 1.21.6.4 +++ squid/src/http.c 5 Sep 2002 13:12:12 -0000 1.21.6.5 @@ -1,6 +1,6 @@ /* - * $Id: http.c,v 1.21.6.4 2002/09/05 12:39:24 rbcollins Exp $ + * $Id: http.c,v 1.21.6.5 2002/09/05 13:12:12 rbcollins Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -314,7 +314,9 @@ case HTTP_UNAUTHORIZED: case HTTP_PROXY_AUTHENTICATION_REQUIRED: case HTTP_INVALID_HEADER: /* Squid header parsing error */ + return 0; default: /* Unknown status code */ + debug (11,0)("httpCachableReply: unknown http status code in reply\n"); return 0; /* NOTREACHED */ break; @@ -429,6 +431,11 @@ /* Parse headers into reply structure */ /* what happens if we fail to parse here? */ httpReplyParse(reply, httpState->reply_hdr, hdr_len); + /* TODO: we need our own reply * in the httpState, as we probably don't want to replace + * the storeEntry with interim headers + */ + + storeEntryReplaceObject(entry, reply); storeTimestampsSet(entry); /* Check if object is cacheable or not based on reply code */ debug(11, 3) ("httpProcessReplyHeader: HTTP CODE: %d\n", reply->sline.status); @@ -485,10 +492,6 @@ #if HEADERS_LOG headersLog(1, 0, httpState->request->method, reply); #endif - /* TODO: we need our own reply * in the httpState, as we probably don't want to replace - * the storeEntry with interim headers - */ - storeEntryReplaceObject (entry, reply); } static int