* \retval 1 Header has no access controls to test
*/
static int
-httpHdrMangle(HttpHeaderEntry * e, HttpRequest * request, HeaderManglers *hms)
+httpHdrMangle(HttpHeaderEntry * e, HttpRequest * request, HeaderManglers *hms, const AccessLogEntryPointer &al)
{
int retval;
ACLFilledChecklist checklist(hm->access_list, request, NULL);
+ checklist.al = al;
+ if (al && al->reply) {
+ checklist.reply = al->reply.getRaw();
+ HTTPMSGLOCK(checklist.reply);
+ }
+
if (checklist.fastCheck().allowed()) {
/* aclCheckFast returns true for allow. */
debugs(66, 7, "checklist for mangler is positive. Mangle");
if (hms) {
int headers_deleted = 0;
while ((e = l->getEntry(&p))) {
- if (0 == httpHdrMangle(e, request, hms))
+ if (httpHdrMangle(e, request, hms, al) == 0)
l->delAt(p, headers_deleted);
}
ACLFilledChecklist checklist(p->access, request, NULL);
checklist.al = ps->al;
+ if (ps->al && ps->al->reply) {
+ checklist.reply = ps->al->reply.getRaw();
+ HTTPMSGLOCK(checklist.reply);
+ }
checklist.syncAle(request, nullptr);
return checklist.fastCheck().allowed();
}