HaveParsedReplyHeaders() sets the entry public key and various flags (at
least). ReplaceHttpReply() packs reply headers, starting swapout process.
It feels natural to adjust the entry _before_ we pack/swap it, but I may be
missing some side-effects here.
The change was necessary because we started calling checkCachable() from
swapoutPossible(). If haveParsedReplyHeaders() is not called before we swap
out checks, the entry will still have the private key and will be declared
impossible to cache.
assert(rep);
theFinalReply = HTTPMSGLOCK(rep);
- entry->replaceHttpReply(theFinalReply);
haveParsedReplyHeaders();
+ entry->replaceHttpReply(theFinalReply);
return theFinalReply;
}