diff --git a/src/DelayId.cc b/src/DelayId.cc index e348334..97aea98 100644 --- a/src/DelayId.cc +++ b/src/DelayId.cc @@ -90,7 +90,7 @@ DelayId::operator bool() const /* create a delay Id for a given request */ DelayId -DelayId::DelayClient(ClientHttpRequest * http) +DelayId::DelayClient(ClientHttpRequest * http, HttpReply *reply) { HttpRequest *r; unsigned short pool; @@ -112,6 +112,9 @@ DelayId::DelayClient(ClientHttpRequest * http) } ACLFilledChecklist ch(DelayPools::delay_data[pool].access, r, NULL); + if(reply) { + ch.reply = HTTPMSGLOCK(reply); + } #if FOLLOW_X_FORWARDED_FOR if (Config.onoff.delay_pool_uses_indirect_client) ch.src_addr = r->indirect_client_addr; diff --git a/src/DelayId.h b/src/DelayId.h index 2f0f9f2..baef7a8 100644 --- a/src/DelayId.h +++ b/src/DelayId.h @@ -36,6 +36,7 @@ #if USE_DELAY_POOLS class ClientHttpRequest; +class HttpReply; #include "DelayIdComposite.h" /// \ingroup DelayPoolsAPI @@ -43,7 +44,7 @@ class DelayId { public: - static DelayId DelayClient (ClientHttpRequest *); + static DelayId DelayClient (ClientHttpRequest *, HttpReply *reply=NULL); DelayId (); DelayId (unsigned short); ~DelayId (); diff --git a/src/client_side_reply.cc b/src/client_side_reply.cc index 833c8f8..315d89a 100644 --- a/src/client_side_reply.cc +++ b/src/client_side_reply.cc @@ -2145,6 +2145,10 @@ clientReplyContext::sendMoreData (StoreIOBuffer result) cloneReply(); +#if USE_DELAY_POOLS + if(sc) sc->setDelayId(DelayId::DelayClient(http,reply)); +#endif + /* handle headers */ if (Config.onoff.log_mime_hdrs) {