summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/fhp/fhp.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/include/fhp/fhp.h b/include/fhp/fhp.h
index 1e32a0d..2739bc9 100644
--- a/include/fhp/fhp.h
+++ b/include/fhp/fhp.h
@@ -120,7 +120,7 @@ void fhp_env_init(fhp_env_t * const env);
fhp_env_t *fhp_get_default_env(void);
//
-// content length parser functions
+// content-length parser functions
//
typedef enum {
@@ -138,8 +138,17 @@ typedef struct {
uint64_t val;
} fhp_cl_parser_t;
+fhp_err_t
+fhp_cl_parser_init(fhp_cl_parser_t * const);
+
+fhp_err_t
+fhp_cl_parser_push(fhp_cl_parser_t *, uint8_t * const, size_t);
+
+fhp_err_t
+fhp_cl_parser_done(fhp_cl_parser_t * const, uint64_t * const);
+
//
-// transfer encoding parser functions
+// transfer-encoding parser functions
//
typedef enum {
@@ -170,7 +179,7 @@ typedef struct {
} fhp_te_parser_t;
fhp_err_t
-fhp_te_parser_init(fhp_te_parser_t * const te);
+fhp_te_parser_init(fhp_te_parser_t * const);
fhp_err_t
fhp_te_parser_push(fhp_te_parser_t *, uint8_t * const, size_t);
@@ -267,6 +276,7 @@ struct fhp_t_ {
union {
fhp_te_parser_t te;
+ fhp_cl_parser_t cl;
} parsers;
// request body type