From 0308b0cc9fab95f0f12aa874ae1fcded31d7f573 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Sun, 28 Aug 2016 23:23:10 -0400 Subject: add content-type parser --- ctx.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ctx.c') diff --git a/ctx.c b/ctx.c index d2d7245..60b379e 100644 --- a/ctx.c +++ b/ctx.c @@ -112,6 +112,7 @@ static const fhp_ctx_t FHP_CTX_DEFAULT = { .body_type = FHP_BODY_TYPE_NONE, .content_length = 0, .num_tes = 0, + .content_type = FHP_CONTENT_TYPE_NONE, }; fhp_err_t @@ -884,3 +885,8 @@ uint64_t fhp_ctx_get_content_length(fhp_ctx_t * const ctx) { return ctx->content_length; } + +fhp_content_type_t +fhp_ctx_get_content_type(fhp_ctx_t * const ctx) { + return ctx->content_type; +} -- cgit v1.2.3