--------------------- PatchSet 11715 Date: 2007/10/02 01:04:26 Author: hno Branch: SQUID_2_6 Tag: (none) Log: MFC: Fix HTTP/0.9 responses Members: src/http.c:1.419.2.8->1.419.2.9 Index: squid/src/http.c =================================================================== RCS file: /cvsroot/squid/squid/src/http.c,v retrieving revision 1.419.2.8 retrieving revision 1.419.2.9 diff -u -r1.419.2.8 -r1.419.2.9 --- squid/src/http.c 21 Jul 2007 21:05:55 -0000 1.419.2.8 +++ squid/src/http.c 2 Oct 2007 01:04:26 -0000 1.419.2.9 @@ -1,6 +1,6 @@ /* - * $Id: http.c,v 1.419.2.8 2007/07/21 21:05:55 hno Exp $ + * $Id: http.c,v 1.419.2.9 2007/10/02 01:04:26 hno Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -432,7 +432,7 @@ debug(11, 3) ("httpProcessReplyHeader: Non-HTTP-compliant header: '%s'\n", httpState->reply_hdr.buf); httpState->reply_hdr_state += 2; httpState->chunk_size = -1; /* Terminated by EOF */ - memBufClean(&httpState->reply_hdr); + httpState->reply_hdr.size = old_size; httpBuildVersion(&reply->sline.version, 0, 9); reply->sline.status = HTTP_INVALID_HEADER; ctx_exit(ctx); @@ -956,6 +956,8 @@ httpHeaderPutTime(&reply->header, HDR_DATE, squid_curtime); mb = httpReplyPack(reply); storeAppend(entry, mb.buf, mb.size); + storeAppend(entry, httpState->reply_hdr.buf, httpState->reply_hdr.size); + memBufClean(&httpState->reply_hdr); httpReplyReset(reply); httpReplyParse(reply, mb.buf, mb.size); memBufClean(&mb);