/*
- * 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.
#include "DelayId.h"
#include "DelayPool.h"
#include "DelayPools.h"
+#include "http/Stream.h"
#include "HttpRequest.h"
#include "SquidConfig.h"
/* create a delay Id for a given request */
DelayId
-DelayId::DelayClient(ClientHttpRequest * http)
+DelayId::DelayClient(ClientHttpRequest * http, HttpReply *reply)
{
HttpRequest *r;
unsigned short pool;
}
ACLFilledChecklist ch(DelayPools::delay_data[pool].access, r, NULL);
+ if (reply) {
+ ch.reply = reply;
+ HTTPMSGLOCK(reply);
+ }
#if FOLLOW_X_FORWARDED_FOR
if (Config.onoff.delay_pool_uses_indirect_client)
ch.src_addr = r->indirect_client_addr;
if (http->getConn() != NULL)
ch.conn(http->getConn());
- if (DelayPools::delay_data[pool].theComposite().getRaw() && ch.fastCheck() == ACCESS_ALLOWED) {
+ if (DelayPools::delay_data[pool].theComposite().getRaw() && ch.fastCheck().allowed()) {
DelayId result (pool + 1);
CompositePoolNode::CompositeSelectionDetails details;