header: fix field sizes

The flags enum does not fit into 6 bits anymore.

Fix: #218
PR-URL: https://github.com/joyent/http-parser/pull/219
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
make-http-max-header-size-gyp-configurable
Fedor Indutny 10 years ago
parent 53063b780b
commit 7ba312397c

@ -204,8 +204,8 @@ enum http_errno {
struct http_parser { struct http_parser {
/** PRIVATE **/ /** PRIVATE **/
unsigned int type : 2; /* enum http_parser_type */ unsigned int type : 2; /* enum http_parser_type */
unsigned int flags : 6; /* F_* values from 'flags' enum; semi-public */ unsigned int flags : 7; /* F_* values from 'flags' enum; semi-public */
unsigned int state : 8; /* enum state from http_parser.c */ unsigned int state : 7; /* enum state from http_parser.c */
unsigned int header_state : 8; /* enum header_state from http_parser.c */ unsigned int header_state : 8; /* enum header_state from http_parser.c */
unsigned int index : 8; /* index into current matcher */ unsigned int index : 8; /* index into current matcher */

Loading…
Cancel
Save