From 87807c690947f4636dc4dd7fddca15f944719f0c Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Thu, 12 Feb 2026 16:59:55 +0100 Subject: Add HTTP op and resource to length callback Users might want to know which HTTP operation (i.e., POST or PUT) and/or resource is being requested before determining whether the request should be accepted or not. --- http.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'http.c') diff --git a/http.c b/http.c index 0fcae07..978eea6 100644 --- a/http.c +++ b/http.c @@ -1608,7 +1608,8 @@ static int check_length(struct http_ctx *const h) .value = c->value }; - return h->cfg.length(c->u2.payload.len, &cookie, &h->wctx.r, h->cfg.user); + return h->cfg.length(c->op, c->resource, c->u2.payload.len, &cookie, + &h->wctx.r, h->cfg.user); } static int process_payload_expect(struct http_ctx *const h) -- cgit v1.2.3