aboutsummaryrefslogtreecommitdiff
path: root/http.c
diff options
context:
space:
mode:
Diffstat (limited to 'http.c')
-rw-r--r--http.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/http.c b/http.c
index ec5cc7f..0960d85 100644
--- a/http.c
+++ b/http.c
@@ -905,7 +905,7 @@ static struct http_payload ctx_to_payload(const struct ctx *const c)
};
}
-static int payload_get(struct http_ctx *const h, const char *const line)
+static int process_payload(struct http_ctx *const h, const char *const line)
{
struct ctx *const c = &h->ctx;
const struct http_payload p = ctx_to_payload(c);
@@ -919,20 +919,6 @@ static int payload_get(struct http_ctx *const h, const char *const line)
return start_response(h);
}
-static int payload_post(struct http_ctx *const h, const char *const line)
-{
- struct ctx *const c = &h->ctx;
- const struct http_payload pl = ctx_to_payload(c);
- const int ret = h->cfg.payload(&pl, &h->wctx.r, h->cfg.user);
-
- ctx_free(c);
-
- if (ret)
- return ret;
-
- return start_response(h);
-}
-
static int get_field_value(const char *const line, size_t *const n,
const char **const value)
{
@@ -1052,12 +1038,12 @@ static int header_cr_line(struct http_ctx *const h)
switch (c->op)
{
case HTTP_OP_GET:
- return payload_get(h, line);
+ return process_payload(h, line);
case HTTP_OP_POST:
{
if (!c->post.len)
- return payload_post(h, line);
+ return process_payload(h, line);
else if (c->boundary)
{
const int res = check_length(h);