diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/fhp/fhp.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/fhp/fhp.h b/include/fhp/fhp.h index 46efb44..1e32a0d 100644 --- a/include/fhp/fhp.h +++ b/include/fhp/fhp.h @@ -41,6 +41,12 @@ typedef enum { FHP_ERR_TE_PARSER_DONE, FHP_ERR_NULL_TE_BUF, FHP_ERR_SMALL_TE_BUF, + FHP_ERR_INVALID_CHAR_BEFORE_CL, + FHP_ERR_INVALID_CHAR_IN_CL, + FHP_ERR_INVALID_CHAR_AFTER_CL, + FHP_ERR_CL_PARSER_DONE, + FHP_ERR_BAD_CL_STATE, + FHP_ERR_CL_OVERFLOW, FHP_ERR_LAST } fhp_err_t; @@ -114,6 +120,25 @@ void fhp_env_init(fhp_env_t * const env); fhp_env_t *fhp_get_default_env(void); // +// content length parser functions +// + +typedef enum { + FHP_CL_STATE_INIT, + FHP_CL_STATE_DATA, + FHP_CL_STATE_TRAILING_SPACES, + FHP_CL_STATE_ERROR, + FHP_CL_STATE_DONE, + FHP_CL_STATE_LAST +} fhp_cl_state_t; + +typedef struct { + fhp_cl_state_t state; + fhp_err_t err; + uint64_t val; +} fhp_cl_parser_t; + +// // transfer encoding parser functions // |