summaryrefslogtreecommitdiff
path: root/include/fhp
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2016-08-28 03:38:59 -0400
committerPaul Duncan <pabs@pablotron.org>2016-08-28 03:38:59 -0400
commite69874791daf88461c6813e5133bf775055ea2bf (patch)
tree147e4c0e721f778ed2ec3313c909c2dcd0f6e907 /include/fhp
parentc10bcfa7def7a1093d78dcb15fd95388a633fc99 (diff)
downloadlibfhp-e69874791daf88461c6813e5133bf775055ea2bf.tar.bz2
libfhp-e69874791daf88461c6813e5133bf775055ea2bf.zip
add cl_parser test
Diffstat (limited to 'include/fhp')
-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