X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_message_parser.c;h=cf4d4fa3ec48cd0aabeea3cac9198770abff7506;hp=9accc354882ac2374092a6cf9a90765954033038;hb=2e9ac0202f2c5f1cb94e0afd4b66c1c35c316284;hpb=df06e2dbf48a3b0d96f2c62071c1b5fc907a98d0 diff --git a/php_http_message_parser.c b/php_http_message_parser.c index 9accc35..cf4d4fa 100644 --- a/php_http_message_parser.c +++ b/php_http_message_parser.c @@ -1,4 +1,16 @@ -#include "php_http.h" +/* + +--------------------------------------------------------------------+ + | PECL :: http | + +--------------------------------------------------------------------+ + | Redistribution and use in source and binary forms, with or without | + | modification, are permitted provided that the conditions mentioned | + | in the accompanying LICENSE file are met. | + +--------------------------------------------------------------------+ + | Copyright (c) 2004-2011, Michael Wallner | + +--------------------------------------------------------------------+ +*/ + +#include "php_http_api.h" typedef struct php_http_message_parser_state_spec { php_http_message_parser_state_t state; @@ -74,10 +86,10 @@ PHP_HTTP_API void php_http_message_parser_dtor(php_http_message_parser_t *parser php_http_header_parser_dtor(&parser->header); zend_stack_destroy(&parser->stack); if (parser->dechunk) { - php_http_encoding_stream_free(&parser->dechunk TSRMLS_CC); + php_http_encoding_stream_free(&parser->dechunk); } if (parser->inflate) { - php_http_encoding_stream_free(&parser->inflate TSRMLS_CC); + php_http_encoding_stream_free(&parser->inflate); } } @@ -277,7 +289,7 @@ PHP_HTTP_API php_http_message_parser_state_t php_http_message_parser_parse(php_h char *dec_str = NULL; size_t dec_len; - if (SUCCESS != php_http_encoding_stream_update(parser->inflate, str, len, &dec_str, &dec_len TSRMLS_CC)) { + if (SUCCESS != php_http_encoding_stream_update(parser->inflate, str, len, &dec_str, &dec_len)) { return php_http_message_parser_state_push(parser, 1, PHP_HTTP_MESSAGE_PARSER_STATE_FAILURE); } @@ -345,7 +357,7 @@ PHP_HTTP_API php_http_message_parser_state_t php_http_message_parser_parse(php_h char *dec_str = NULL; size_t dec_len; - if (SUCCESS != php_http_encoding_stream_update(parser->dechunk, buffer->data, buffer->used, &dec_str, &dec_len TSRMLS_CC)) { + if (SUCCESS != php_http_encoding_stream_update(parser->dechunk, buffer->data, buffer->used, &dec_str, &dec_len)) { return FAILURE; } @@ -370,7 +382,7 @@ PHP_HTTP_API php_http_message_parser_state_t php_http_message_parser_parse(php_h char *dec_str = NULL; size_t dec_len; - if (SUCCESS != php_http_encoding_stream_finish(parser->dechunk, &dec_str, &dec_len TSRMLS_CC)) { + if (SUCCESS != php_http_encoding_stream_finish(parser->dechunk, &dec_str, &dec_len)) { return php_http_message_parser_state_push(parser, 1, PHP_HTTP_MESSAGE_PARSER_STATE_FAILURE); } php_http_encoding_stream_dtor(parser->dechunk); @@ -401,3 +413,13 @@ PHP_HTTP_API php_http_message_parser_state_t php_http_message_parser_parse(php_h return php_http_message_parser_state_is(parser); } + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: noet sw=4 ts=4 fdm=marker + * vim<600: noet sw=4 ts=4 + */ +