X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=http_functions.c;h=807b0a527cb94ae2f3bfeff483bf066b6eb08d7c;hb=b20ced89bee0617c45447f51ed0baa7046851a65;hp=ceac1a1eee4bbb3d9797e0c0df87149138fd4196;hpb=2f39230d83bdf816dcae52c7e5a1b019347f0e7b;p=m6w6%2Fext-http diff --git a/http_functions.c b/http_functions.c index ceac1a1..807b0a5 100644 --- a/http_functions.c +++ b/http_functions.c @@ -1097,16 +1097,21 @@ PHP_FUNCTION(http_parse_params) { char *param; int param_len; + zval *params; if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", ¶m, ¶m_len)) { RETURN_FALSE; } - object_init(return_value); - if (SUCCESS != http_parse_params(param, HASH_OF(return_value))) { - zval_dtor(return_value); + params = ecalloc(1, sizeof(zval)); + array_init(params); + if (SUCCESS != http_parse_params(param, Z_ARRVAL_P(params))) { + zval_dtor(params); + FREE_ZVAL(params); RETURN_FALSE; } + object_init(return_value); + add_property_zval(return_value, "params", params); } /* }}} */ @@ -1243,9 +1248,8 @@ PHP_FUNCTION(http_match_request_header) * - cookies: array, list of cookies as associative array * like array("cookie" => "value") * - encodecookies: bool, whether to urlencode the cookies (default: true) - * - resetcookies: bool, wheter to reset the cookies * - cookiestore: string, path to a file where cookies are/will be stored - * - cookiesession: bool, accept (true) or reset (false) sessioncookies + * - cookiesession: bool, don't load session cookies from cookiestore if TRUE * - resume: int, byte offset to start the download from; * if the server supports ranges * - range: array, array of arrays, each containing two integers,