summaryrefslogtreecommitdiff
path: root/include/fhp
diff options
context:
space:
mode:
Diffstat (limited to 'include/fhp')
-rw-r--r--include/fhp/fhp.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/fhp/fhp.h b/include/fhp/fhp.h
index 5ca48b7..46efb44 100644
--- a/include/fhp/fhp.h
+++ b/include/fhp/fhp.h
@@ -84,6 +84,9 @@ typedef enum {
FHP_TOKEN_HEADER_VALUE_FRAGMENT,
FHP_TOKEN_HEADER_VALUE_END,
+ FHP_TOKEN_HEADER_TRANSFER_ENCODING,
+ FHP_TOKEN_HEADER_CONTENT_LENGTH,
+
FHP_TOKEN_LAST
} fhp_token_t;
@@ -191,6 +194,13 @@ typedef enum {
FHP_STATE_LAST
} fhp_state_t;
+typedef enum {
+ FHP_HEADER_VALUE_PARSER_NONE,
+ FHP_HEADER_VALUE_PARSER_TRANSFER_ENCODING,
+ FHP_HEADER_VALUE_PARSER_CONTENT_LENGTH,
+ FHP_HEADER_VALUE_PARSER_LAST
+} fhp_header_value_parser_t;
+
#define FHP_MAX_BUF_SIZE 1024
#define FHP_MAX_TRANSFER_ENCODINGS 4
@@ -227,6 +237,13 @@ struct fhp_t_ {
// hash of last header name
uint32_t header_name_hash;
+ // header value parser
+ fhp_header_value_parser_t header_value_parser;
+
+ union {
+ fhp_te_parser_t te;
+ } parsers;
+
// request body type
fhp_body_type_t body_type;