X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_message_parser.h;h=ebc2142157bd3feb13021e53cfafe5abc6960352;hp=31c30040117ff2877f3028bf36e7c8c02db0c777;hb=15d24933014cba8806f50ae32ee73145df3f3a99;hpb=8d05291f42b3b42159b3fe91492aa4862f3d4405 diff --git a/php_http_message_parser.h b/php_http_message_parser.h index 31c3004..ebc2142 100644 --- a/php_http_message_parser.h +++ b/php_http_message_parser.h @@ -6,7 +6,7 @@ | modification, are permitted provided that the conditions mentioned | | in the accompanying LICENSE file are met. | +--------------------------------------------------------------------+ - | Copyright (c) 2004-2011, Michael Wallner | + | Copyright (c) 2004-2014, Michael Wallner | +--------------------------------------------------------------------+ */ @@ -33,10 +33,11 @@ typedef enum php_http_message_parser_state { #define PHP_HTTP_MESSAGE_PARSER_CLEANUP 0x1 #define PHP_HTTP_MESSAGE_PARSER_DUMB_BODIES 0x2 #define PHP_HTTP_MESSAGE_PARSER_EMPTY_REDIRECTS 0x4 +#define PHP_HTTP_MESSAGE_PARSER_GREEDY 0x8 typedef struct php_http_message_parser { php_http_header_parser_t header; - zend_stack stack; + zend_ptr_stack stack; size_t body_length; php_http_message_t *message; php_http_encoding_stream_t *dechunk; @@ -53,6 +54,7 @@ PHP_HTTP_API php_http_message_parser_state_t php_http_message_parser_state_pop(p PHP_HTTP_API void php_http_message_parser_dtor(php_http_message_parser_t *parser); PHP_HTTP_API void php_http_message_parser_free(php_http_message_parser_t **parser); PHP_HTTP_API php_http_message_parser_state_t php_http_message_parser_parse(php_http_message_parser_t *parser, php_http_buffer_t *buffer, unsigned flags, php_http_message_t **message); +PHP_HTTP_API php_http_message_parser_state_t php_http_message_parser_parse_stream(php_http_message_parser_t *parser, php_stream *s, unsigned flags, php_http_message_t **message); #endif