From: DrDaveD <2129743+DrDaveD@users.noreply.github.com> Date: Mon, 30 Dec 2019 20:43:33 +0000 (+0000) Subject: Bug 4735: Truncated chunked responses cached as whole (#528) X-Git-Tag: SQUID_5_0_1~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=33ca7b61bc03ab0b0a1332363368bc26227d2cf3;p=thirdparty%2Fsquid.git Bug 4735: Truncated chunked responses cached as whole (#528) Mark responses received without the last chunk as responses that have bad (and, hence, unknown) message body length (i.e. ENTRY_BAD_LENGTH). If they were being cached, such responses will be released and will stop being shareable. --- diff --git a/src/http.cc b/src/http.cc index 742cf65d43..9c0601b0a6 100644 --- a/src/http.cc +++ b/src/http.cc @@ -1505,6 +1505,9 @@ HttpStateData::processReplyBody() case COMPLETE_NONPERSISTENT_MSG: debugs(11, 5, "processReplyBody: COMPLETE_NONPERSISTENT_MSG from " << serverConnection); + if (flags.chunked && !lastChunk) + entry->lengthWentBad("missing last-chunk"); + serverComplete(); return; }