/*
- * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
Config.replPolicy = new RemovalPolicySettings;
Config.replPolicy->type = xstrdup("lru");
+ Config.memShared.defaultTo(false);
+
/* garh garh */
storeReplAdd("lru", createRemovalPolicy_lru);
httpHeaderInitModule(); /* must go before any header processing (e.g. the one in errorInitialize) */
- httpReplyInitModule(); /* must go before accepting replies */
-
inited = true;
}
RequestFlags flags;
flags.cachable = true;
StoreEntry *pe = storeCreateEntry("dummy url", "dummy log url", flags, Http::METHOD_GET);
- HttpReply *rep = (HttpReply *) pe->getReply(); // bypass const
- rep->setHeaders(Http::scOkay, "dummy test object", "x-squid-internal/test", 0, -1, squid_curtime + 100000);
+ auto &reply = pe->mem().adjustableBaseReply();
+ reply.setHeaders(Http::scOkay, "dummy test object", "x-squid-internal/test", 0, -1, squid_curtime + 100000);
pe->setPublicKey();
pe->buffer();
- pe->getReply()->packHeadersInto(pe);
+ pe->mem().freshestReply().packHeadersUsingSlowPacker(*pe);
pe->flush();
pe->timestampsSet();
pe->complete();