/* 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 USE_DELAY_POOLS
-class ClientHttpRequest;
#include "DelayIdComposite.h"
+class ClientHttpRequest;
+class HttpReply;
+
/// \ingroup DelayPoolsAPI
class DelayId
{
public:
- static DelayId DelayClient (ClientHttpRequest *);
+ static DelayId DelayClient(ClientHttpRequest *, HttpReply *reply = nullptr);
DelayId ();
DelayId (unsigned short);
~DelayId ();
cloneReply();
+#if USE_DELAY_POOLS
+ if (sc)
+ sc->setDelayId(DelayId::DelayClient(http,reply));
+#endif
+
/* handle headers */
if (Config.onoff.log_mime_hdrs) {