| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
PHP_HTTP_API php_http_request_t *php_http_request_init(php_http_request_t *h, php_http_request_ops_t *ops, php_http_resource_factory_t *rf, void *init_arg TSRMLS_DC)
{
PHP_HTTP_API php_http_request_t *php_http_request_init(php_http_request_t *h, php_http_request_ops_t *ops, php_http_resource_factory_t *rf, void *init_arg TSRMLS_DC)
{
- h->rf = rf ? rf : php_http_resource_factory_init(NULL, h->ops->rsrc, NULL, NULL);
+ h->rf = rf ? rf : php_http_resource_factory_init(NULL, h->ops->rsrc, h, NULL);
h->buffer = php_http_buffer_init(NULL);
h->parser = php_http_message_parser_init(NULL TSRMLS_CC);
h->message = php_http_message_init(NULL, 0 TSRMLS_CC);
h->buffer = php_http_buffer_init(NULL);
h->parser = php_http_message_parser_init(NULL TSRMLS_CC);
h->message = php_http_message_init(NULL, 0 TSRMLS_CC);
static int apply_pretty_key(void *pDest TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key)
{
if (hash_key->arKey && hash_key->nKeyLength > 1) {
static int apply_pretty_key(void *pDest TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key)
{
if (hash_key->arKey && hash_key->nKeyLength > 1) {
hash_key->h = zend_hash_func(php_http_pretty_key(hash_key->arKey, hash_key->nKeyLength - 1, 1, 0), hash_key->nKeyLength);
}
return ZEND_HASH_APPLY_KEEP;
hash_key->h = zend_hash_func(php_http_pretty_key(hash_key->arKey, hash_key->nKeyLength - 1, 1, 0), hash_key->nKeyLength);
}
return ZEND_HASH_APPLY_KEEP;
- if (SUCCESS == zend_hash_find(Z_ARRVAL_P(new_opts), key, len, (void *) &entry)) {
+ if (SUCCESS == zend_symtable_find(Z_ARRVAL_P(new_opts), key, len, (void *) &entry)) {
- (SUCCESS == zend_hash_find(Z_ARRVAL_P(opts), key, len, (void *) &options))) {
+ (SUCCESS == zend_symtable_find(Z_ARRVAL_P(opts), key, len, (void *) &options))) {
convert_to_array(*options);
array_copy(Z_ARRVAL_PP(options), Z_ARRVAL_P(return_value));
}
convert_to_array(*options);
array_copy(Z_ARRVAL_PP(options), Z_ARRVAL_P(return_value));
}
- if (SUCCESS == zend_hash_find(Z_ARRVAL_P(info), php_http_pretty_key(info_name, info_len, 0, 0), info_len + 1, (void *) &infop)) {
+ if (SUCCESS == zend_symtable_find(Z_ARRVAL_P(info), php_http_pretty_key(info_name, info_len, 0, 0), info_len + 1, (void *) &infop)) {
RETVAL_ZVAL(*infop, 1, 0);
} else {
php_http_error(HE_NOTICE, PHP_HTTP_E_INVALID_PARAM, "Could not find transfer info named %s", info_name);
RETVAL_ZVAL(*infop, 1, 0);
} else {
php_http_error(HE_NOTICE, PHP_HTTP_E_INVALID_PARAM, "Could not find transfer info named %s", info_name);
} else if (Z_TYPE_PP(opt) == IS_NULL) {
old_opts = zend_read_property(php_http_request_class_entry, getThis(), ZEND_STRL("options"), 0 TSRMLS_CC);
if (Z_TYPE_P(old_opts) == IS_ARRAY) {
} else if (Z_TYPE_PP(opt) == IS_NULL) {
old_opts = zend_read_property(php_http_request_class_entry, getThis(), ZEND_STRL("options"), 0 TSRMLS_CC);
if (Z_TYPE_P(old_opts) == IS_ARRAY) {
FOREACH_VAL(pos2, *header, single_header) {
zval *data = php_http_ztyp(IS_STRING, *single_header);
FOREACH_VAL(pos2, *header, single_header) {
zval *data = php_http_ztyp(IS_STRING, *single_header);
- if ((list = php_http_cookie_list_parse(NULL, Z_STRVAL_P(data), flags, allowed_extras TSRMLS_CC))) {
+ if ((list = php_http_cookie_list_parse(NULL, Z_STRVAL_P(data), Z_STRLEN_P(data), flags, allowed_extras TSRMLS_CC))) {
- if ((list = php_http_cookie_list_parse(NULL, Z_STRVAL_P(data), flags, allowed_extras TSRMLS_CC))) {
+ if ((list = php_http_cookie_list_parse(NULL, Z_STRVAL_P(data), Z_STRLEN_P(data), flags, allowed_extras TSRMLS_CC))) {