struct cache_tree *cache_tree;
struct cache_entry *entry; /* Entry to be sent from cache. */
unsigned int sent; /* The number of bytes already sent for this cache entry. */
- unsigned int data_sent; /* The number of bytes of the payload already sent for this cache entry. */
unsigned int offset; /* start offset of remaining data relative to beginning of the next block */
unsigned int rem_data; /* Remaining bytes for the last data block (HTX only, 0 means process next block) */
unsigned int send_notmodified:1; /* In case of conditional request, we might want to send a "304 Not Modified" response instead of the stored data. */
ctx->offset = offset;
ctx->next = shblk;
ctx->sent += total;
- ctx->data_sent += data_len;
ctx->rem_data = rem_data + blksz;
appctx->to_forward -= data_len;
return total;
ctx->offset = offset;
ctx->next = shblk;
ctx->sent += total;
- ctx->data_sent += data_len;
ctx->rem_data = rem_data + blksz;
appctx->to_forward -= data_len;
return total;
if (ctx->sent == first->len - sizeof(*cache_ptr)) {
applet_set_eoi(appctx);
applet_set_eos(appctx);
- BUG_ON(ctx->data_sent != cache_ptr->body_size);
appctx->st0 = HTX_CACHE_END;
}
}
}
}
BUG_ON(appctx->to_forward);
- BUG_ON(ctx->data_sent != cache_ptr->body_size);
appctx->st0 = HTX_CACHE_EOM;
}
ctx->cache_tree = cache_tree;
ctx->entry = res;
ctx->next = NULL;
- ctx->sent = ctx->data_sent = 0;
+ ctx->sent = 0;
ctx->send_notmodified =
should_send_notmodified_response(cache, htxbuf(&s->req.buf), res);