X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=http_functions.c;h=2cd1dfe554b4d5974253b35efed8eb37e5201186;hb=b0719c36a9a5340adb9a7cbabe0b486b215dee1f;hp=04377f54ac12c34d94082d799a3916f4f3246b6e;hpb=370748ba4211ca298fec6706343413888c8b393f;p=m6w6%2Fext-http diff --git a/http_functions.c b/http_functions.c index 04377f5..2cd1dfe 100644 --- a/http_functions.c +++ b/http_functions.c @@ -250,7 +250,7 @@ PHP_FUNCTION(http_build_str) zval **value; \ \ zend_hash_internal_pointer_reset(Z_ARRVAL_P(supported)); \ - if (SUCCESS == zend_hash_get_current_data(Z_ARRVAL_P(supported), (void **) &value)) { \ + if (SUCCESS == zend_hash_get_current_data(Z_ARRVAL_P(supported), (void *) &value)) { \ RETVAL_ZVAL(*value, 1, 0); \ } else { \ RETVAL_NULL(); \ @@ -1034,6 +1034,7 @@ PHP_FUNCTION(http_parse_headers) array_init(return_value); if (SUCCESS != http_parse_headers(header, return_value)) { zval_dtor(return_value); + http_error(HE_WARNING, HTTP_E_MALFORMED_HEADERS, "Failed to parse headers"); RETURN_FALSE; } } @@ -1206,7 +1207,7 @@ PHP_FUNCTION(http_match_request_header) zval **bodyonly; \ \ /* check if only the body should be returned */ \ - if (options && (SUCCESS == zend_hash_find(Z_ARRVAL_P(options), "bodyonly", sizeof("bodyonly"), (void **) &bodyonly)) && zval_is_true(*bodyonly)) { \ + if (options && (SUCCESS == zend_hash_find(Z_ARRVAL_P(options), "bodyonly", sizeof("bodyonly"), (void *) &bodyonly)) && zval_is_true(*bodyonly)) { \ http_message *msg = http_message_parse(PHPSTR_VAL(&request.conv.response), PHPSTR_LEN(&request.conv.response)); \ \ if (msg) { \