summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2016-08-28 02:45:06 -0400
committerPaul Duncan <pabs@pablotron.org>2016-08-28 02:45:06 -0400
commitef52728f7e7461cab37ee3cbc3ef9b0d7e328c65 (patch)
tree2da588a094dfdc95cebb75ed0a029dcb0b90aaf0 /include
parent1367fe1bafa1b877f4f92361294eab3a1dd3c11c (diff)
downloadlibfhp-ef52728f7e7461cab37ee3cbc3ef9b0d7e328c65.tar.bz2
libfhp-ef52728f7e7461cab37ee3cbc3ef9b0d7e328c65.zip
add header value parser, fix hashing
Diffstat (limited to 'include')
-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;