aboutsummaryrefslogtreecommitdiff
path: root/http.c
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi92@disroot.org>2026-02-12 16:59:55 +0100
committerXavier Del Campo Romero <xavi92@disroot.org>2026-02-12 16:59:55 +0100
commit87807c690947f4636dc4dd7fddca15f944719f0c (patch)
tree0696d61b91a3e5f40a34cf09ac6c715584af5744 /http.c
parent16f07314e675dd7d9d9cfb44dfb33cd81b13590d (diff)
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.
Diffstat (limited to 'http.c')
-rw-r--r--http.c3
1 files changed, 2 insertions, 1 deletions
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)