}
}
}
-static zval *get_option(zval *options, const char *name_str, size_t name_len)
+static zval *get_option(zval *options, const char *name_str, size_t name_len, zval *tmp)
{
- zval *val;
+ zval *val = NULL;
if (Z_TYPE_P(options) == IS_OBJECT) {
- val = zend_read_property(Z_OBJCE_P(options), options, name_str, name_len, 0);
- } else {
+ val = zend_read_property(Z_OBJCE_P(options), options, name_str, name_len, 0, tmp);
+ } else if (Z_TYPE_P(options) == IS_ARRAY) {
val = zend_symtable_str_find(Z_ARRVAL_P(options), name_str, name_len);
+ } else {
+ abort();
}
if (val) {
Z_TRY_ADDREF_P(val);
}
static php_http_message_body_t *get_body(zval *options)
{
- zval *zbody;
+ zval zbody_tmp, *zbody;
php_http_message_body_t *body = NULL;
- if ((zbody = get_option(options, ZEND_STRL("body")))) {
+ if ((zbody = get_option(options, ZEND_STRL("body"), &zbody_tmp))) {
if ((Z_TYPE_P(zbody) == IS_OBJECT) && instanceof_function(Z_OBJCE_P(zbody), php_http_message_body_class_entry)) {
php_http_message_body_object_t *body_obj = PHP_HTTP_OBJ(NULL, zbody);
body = body_obj->body;
}
- zval_ptr_dtor(zbody);
+ Z_TRY_DELREF_P(zbody);
}
return body;
}
static php_http_message_t *get_request(zval *options)
{
- zval *zrequest;
+ zval zrequest_tmp, *zrequest;
php_http_message_t *request = NULL;
- if ((zrequest = get_option(options, ZEND_STRL("request")))) {
+ if ((zrequest = get_option(options, ZEND_STRL("request"), &zrequest_tmp))) {
if (Z_TYPE_P(zrequest) == IS_OBJECT && instanceof_function(Z_OBJCE_P(zrequest), php_http_message_class_entry)) {
php_http_message_object_t *request_obj = PHP_HTTP_OBJ(NULL, zrequest);
request = request_obj->message;
}
- zval_ptr_dtor(zrequest);
+ Z_TRY_DELREF_P(zrequest);
}
return request;
}
-static void set_cookie(zval *options, zval *zcookie_new TSRMLS_DC)
+static void set_cookie(zval *options, zval *zcookie_new)
{
- zval *zcookies_set;
+ zval tmp, zcookies_set_tmp, *zcookies_set;
php_http_arrkey_t key;
php_http_cookie_object_t *obj = PHP_HTTP_OBJ(NULL, zcookie_new);
- zcookies_set = get_option(options, ZEND_STRL("cookies"));
- if (!zcookies_set || Z_TYPE_P(zcookies_set) != IS_ARRAY) {
- if (zcookies_set) {
- zval_ptr_dtor(zcookies_set);
- }
- array_init_size(zcookies_set, zend_hash_num_elements(&obj->list->cookies));
- } else {
- Z_ADDREF_P(zcookies_set);
- SEPARATE_ZVAL(zcookies_set);
+ array_init(&tmp);
+ zcookies_set = get_option(options, ZEND_STRL("cookies"), &zcookies_set_tmp);
+ if (zcookies_set && Z_TYPE_P(zcookies_set) == IS_ARRAY) {
+ array_copy(Z_ARRVAL_P(zcookies_set), Z_ARRVAL(tmp));
+ zval_ptr_dtor(zcookies_set);
}
ZEND_HASH_FOREACH_KEY(&obj->list->cookies, key.h, key.key)
{
Z_ADDREF_P(zcookie_new);
if (key.key) {
- add_assoc_zval_ex(zcookies_set, key.key->val, key.key->len, zcookie_new);
+ add_assoc_zval_ex(&tmp, key.key->val, key.key->len, zcookie_new);
} else {
- add_index_zval(zcookies_set, key.h, zcookie_new);
+ add_index_zval(&tmp, key.h, zcookie_new);
}
}
ZEND_HASH_FOREACH_END();
- set_option(options, ZEND_STRL("cookies"), IS_ARRAY, zcookies_set, 0);
- zval_ptr_dtor(zcookies_set);
+ set_option(options, ZEND_STRL("cookies"), IS_ARRAY, &tmp, 0);
+ zval_ptr_dtor(&tmp);
}
php_http_cache_status_t php_http_env_is_response_cached_by_etag(zval *options, const char *header_str, size_t header_len, php_http_message_t *request)
php_http_cache_status_t ret = PHP_HTTP_CACHE_NO;
char *header = NULL, *etag = NULL;
php_http_message_body_t *body;
- zval *zetag;
+ zval zetag_tmp, *zetag;
if (!(body = get_body(options))) {
return ret;
}
- if ((zetag = get_option(options, ZEND_STRL("etag")))) {
+ if ((zetag = get_option(options, ZEND_STRL("etag"), &zetag_tmp)) && Z_TYPE_P(zetag) != IS_NULL) {
zend_string *zs = zval_get_string(zetag);
etag = estrndup(zs->val, zs->len);
zend_string_release(zs);
char *header;
time_t ums, lm = 0;
php_http_message_body_t *body;
- zval *zlm;
+ zval zlm_tmp, *zlm;
if (!(body = get_body(options))) {
return ret;
}
- if ((zlm = get_option(options, ZEND_STRL("lastModified")))) {
+ if ((zlm = get_option(options, ZEND_STRL("lastModified"), &zlm_tmp))) {
lm = zval_get_long(zlm);
zval_ptr_dtor(zlm);
}
static zend_bool php_http_env_response_is_cacheable(php_http_env_response_t *r, php_http_message_t *request)
{
- if (r->ops->get_status(r) >= 400) {
+ long status = r->ops->get_status(r);
+
+ if (status && status / 100 != 2) {
return 0;
}
static ZEND_RESULT_CODE php_http_env_response_send_head(php_http_env_response_t *r, php_http_message_t *request)
{
ZEND_RESULT_CODE ret = SUCCESS;
- zval *zoption, *options = &r->options;
+ zval zoption_tmp, *zoption, *options = &r->options;
if (r->done) {
return ret;
}
- if ((zoption = get_option(options, ZEND_STRL("headers")))) {
+ if ((zoption = get_option(options, ZEND_STRL("headers"), &zoption_tmp))) {
if (Z_TYPE_P(zoption) == IS_ARRAY) {
php_http_header_to_callback(Z_ARRVAL_P(zoption), 0, (php_http_pass_format_callback_t) r->ops->set_header, r);
}
return ret;
}
- if ((zoption = get_option(options, ZEND_STRL("responseCode")))) {
+ if ((zoption = get_option(options, ZEND_STRL("responseCode"), &zoption_tmp))) {
zend_long rc = zval_get_long(zoption);
zval_ptr_dtor(zoption);
return ret;
}
- if ((zoption = get_option(options, ZEND_STRL("httpVersion")))) {
+ if ((zoption = get_option(options, ZEND_STRL("httpVersion"), &zoption_tmp))) {
php_http_version_t v;
zend_string *zs = zval_get_string(zoption);
return ret;
}
- if ((zoption = get_option(options, ZEND_STRL("cookies")))) {
+ if ((zoption = get_option(options, ZEND_STRL("cookies"), &zoption_tmp))) {
if (Z_TYPE_P(zoption) == IS_ARRAY) {
zval *zcookie;
return ret;
}
- if ((zoption = get_option(options, ZEND_STRL("contentType")))) {
+ if ((zoption = get_option(options, ZEND_STRL("contentType"), &zoption_tmp))) {
zend_string *zs = zval_get_string(zoption);
zval_ptr_dtor(zoption);
}
}
} else {
- if ((zoption = get_option(options, ZEND_STRL("cacheControl")))) {
+ if ((zoption = get_option(options, ZEND_STRL("cacheControl"), &zoption_tmp))) {
zend_string *zs = zval_get_string(zoption);
zval_ptr_dtor(zoption);
return ret;
}
- if ((zoption = get_option(options, ZEND_STRL("contentDisposition")))) {
- php_http_buffer_t buf;
+ if ((zoption = get_option(options, ZEND_STRL("contentDisposition"), &zoption_tmp))) {
- if (Z_TYPE_P(zoption) != IS_ARRAY) {
- zval *tmp = zoption;
- SEPARATE_ZVAL(tmp);
- convert_to_array(tmp);
- zoption = tmp;
- }
+ if (Z_TYPE_P(zoption) == IS_ARRAY) {
+ php_http_buffer_t buf;
- php_http_buffer_init(&buf);
- if (php_http_params_to_string(&buf, Z_ARRVAL_P(zoption), ZEND_STRL(","), ZEND_STRL(";"), ZEND_STRL("="), PHP_HTTP_PARAMS_DEFAULT)) {
- if (buf.used) {
- ret = r->ops->set_header(r, "Content-Disposition: %.*s", buf.used, buf.data);
+ php_http_buffer_init(&buf);
+ if (php_http_params_to_string(&buf, Z_ARRVAL_P(zoption), ZEND_STRL(","), ZEND_STRL(";"), ZEND_STRL("="), PHP_HTTP_PARAMS_DEFAULT)) {
+ if (buf.used) {
+ ret = r->ops->set_header(r, "Content-Disposition: %.*s", buf.used, buf.data);
+ }
}
- }
- php_http_buffer_dtor(&buf);
+ php_http_buffer_dtor(&buf);
+ }
zval_ptr_dtor(zoption);
}
return ret;
}
- if ((zoption = get_option(options, ZEND_STRL("contentEncoding")))) {
+ if ((zoption = get_option(options, ZEND_STRL("contentEncoding"), &zoption_tmp))) {
zend_long ce = zval_get_long(zoption);
zval zsupported;
HashTable *result = NULL;
break;
}
- if ((zoption = get_option(options, ZEND_STRL("etag")))) {
+ if ((zoption = get_option(options, ZEND_STRL("etag"), &zoption_tmp))) {
zend_string *zs = zval_get_string(zoption);
zval_ptr_dtor(zoption);
}
zend_string_release(zs);
}
- if ((zoption = get_option(options, ZEND_STRL("lastModified") TSRMLS_CC))) {
+ if ((zoption = get_option(options, ZEND_STRL("lastModified"), &zoption_tmp))) {
zend_long lm = zval_get_long(zoption);
zval_ptr_dtor(zoption);
static ZEND_RESULT_CODE php_http_env_response_send_body(php_http_env_response_t *r)
{
ZEND_RESULT_CODE ret = SUCCESS;
- zval *zoption;
+ zval zoption_tmp, *zoption;
php_http_message_body_t *body;
if (r->done) {
}
if ((body = get_body(&r->options))) {
- if ((zoption = get_option(&r->options, ZEND_STRL("throttleDelay")))) {
+ if ((zoption = get_option(&r->options, ZEND_STRL("throttleDelay"), &zoption_tmp))) {
r->throttle.delay = zval_get_double(zoption);
zval_ptr_dtor(zoption);
}
- if ((zoption = get_option(&r->options, ZEND_STRL("throttleChunk") TSRMLS_CC))) {
+ if ((zoption = get_option(&r->options, ZEND_STRL("throttleChunk"), &zoption_tmp))) {
r->throttle.chunk = zval_get_long(zoption);
zval_ptr_dtor(zoption);
}
long status_code;
php_stream *stream;
+ php_stream_filter *chunked_filter;
+ php_http_message_t *request;
unsigned started:1;
unsigned finished:1;
+ unsigned chunked:1;
} php_http_env_response_stream_ctx_t;
static ZEND_RESULT_CODE php_http_env_response_stream_init(php_http_env_response_t *r, void *init_arg)
{
php_http_env_response_stream_ctx_t *ctx;
+ size_t buffer_size = 0x1000;
ctx = ecalloc(1, sizeof(*ctx));
++GC_REFCOUNT(ctx->stream->res);
ZEND_INIT_SYMTABLE(&ctx->header);
php_http_version_init(&ctx->version, 1, 1);
+ php_stream_set_option(ctx->stream, PHP_STREAM_OPTION_WRITE_BUFFER, PHP_STREAM_BUFFER_FULL, &buffer_size);
ctx->status_code = 200;
+ ctx->chunked = 1;
+ ctx->request = get_request(&r->options);
+
+ /* there are some limitations regarding TE:chunked, see https://tools.ietf.org/html/rfc7230#section-3.3.1 */
+ if (ctx->request && ctx->request->http.version.major == 1 && ctx->request->http.version.minor == 0) {
+ ctx->version.minor = 0;
+ }
r->ctx = ctx;
{
php_http_env_response_stream_ctx_t *ctx = r->ctx;
+ if (ctx->chunked_filter) {
+ ctx->chunked_filter = php_stream_filter_remove(ctx->chunked_filter, 1);
+ }
zend_hash_destroy(&ctx->header);
zend_list_delete(ctx->stream->res);
efree(ctx);
r->ctx = NULL;
}
-static void php_http_env_response_stream_header(php_http_env_response_stream_ctx_t *ctx, HashTable *header)
+static void php_http_env_response_stream_header(php_http_env_response_stream_ctx_t *ctx, HashTable *header, php_http_buffer_t *buf)
{
zval *val;
ZEND_HASH_FOREACH_VAL(header, val)
{
if (Z_TYPE_P(val) == IS_ARRAY) {
- php_http_env_response_stream_header(ctx, Z_ARRVAL_P(val));
+ php_http_env_response_stream_header(ctx, Z_ARRVAL_P(val), buf);
} else {
zend_string *zs = zval_get_string(val);
- php_stream_write(ctx->stream, zs->val, zs->len);
- php_stream_write_string(ctx->stream, PHP_HTTP_CRLF);
+ if (ctx->chunked) {
+ /* disable chunked transfer encoding if we've got an explicit content-length */
+ if (!strncasecmp(zs->val, "Content-Length:", lenof("Content-Length:"))) {
+ ctx->chunked = 0;
+ }
+ }
+ php_http_buffer_append(buf, zs->val, zs->len);
+ php_http_buffer_appends(buf, PHP_HTTP_CRLF);
zend_string_release(zs);
}
}
}
static ZEND_RESULT_CODE php_http_env_response_stream_start(php_http_env_response_stream_ctx_t *ctx)
{
+ php_http_buffer_t header_buf;
+
if (ctx->started || ctx->finished) {
return FAILURE;
}
- php_stream_printf(ctx->stream TSRMLS_CC, "HTTP/%u.%u %ld %s" PHP_HTTP_CRLF, ctx->version.major, ctx->version.minor, ctx->status_code, php_http_env_get_response_status_for_code(ctx->status_code));
- php_http_env_response_stream_header(ctx, &ctx->header);
- php_stream_write_string(ctx->stream, PHP_HTTP_CRLF);
- ctx->started = 1;
- return SUCCESS;
+ php_http_buffer_init(&header_buf);
+ php_http_buffer_appendf(&header_buf, "HTTP/%u.%u %ld %s" PHP_HTTP_CRLF, ctx->version.major, ctx->version.minor, ctx->status_code, php_http_env_get_response_status_for_code(ctx->status_code));
+
+ /* there are some limitations regarding TE:chunked, see https://tools.ietf.org/html/rfc7230#section-3.3.1 */
+ if (ctx->version.major == 1 && ctx->version.minor == 0) {
+ ctx->chunked = 0;
+ } else if (ctx->status_code == 204 || ctx->status_code/100 == 1) {
+ ctx->chunked = 0;
+ } else if (ctx->request && ctx->status_code/100 == 2 && !strcasecmp(ctx->request->http.info.request.method, "CONNECT")) {
+ ctx->chunked = 0;
+ }
+
+ php_http_env_response_stream_header(ctx, &ctx->header, &header_buf);
+
+ /* enable chunked transfer encoding */
+ if (ctx->chunked) {
+ php_http_buffer_appends(&header_buf, "Transfer-Encoding: chunked" PHP_HTTP_CRLF);
+ }
+
+ php_http_buffer_appends(&header_buf, PHP_HTTP_CRLF);
+
+ if (header_buf.used == php_stream_write(ctx->stream, header_buf.data, header_buf.used)) {
+ ctx->started = 1;
+ }
+ php_http_buffer_dtor(&header_buf);
+ php_stream_flush(ctx->stream);
+
+ if (ctx->chunked) {
+ ctx->chunked_filter = php_stream_filter_create("http.chunked_encode", NULL, 0);
+ php_stream_filter_append(&ctx->stream->writefilters, ctx->chunked_filter);
+ }
+
+ return ctx->started ? SUCCESS : FAILURE;
}
static long php_http_env_response_stream_get_status(php_http_env_response_t *r)
{
char *header_end, *header_str = NULL;
size_t header_len = 0;
zval zheader, *zheader_ptr;
+ zend_string *header_key;
+ ZEND_RESULT_CODE rv;
if (stream_ctx->started || stream_ctx->finished) {
return FAILURE;
return FAILURE;
}
- *header_end = '\0';
+ header_key = zend_string_init(header_str, header_end - header_str, 0);
- if (!replace && (zheader_ptr = zend_hash_str_find(&stream_ctx->header, header_str, header_end - header_str))) {
+ if (!replace && (zheader_ptr = zend_hash_find(&stream_ctx->header, header_key))) {
convert_to_array(zheader_ptr);
- *header_end = ':';
- return add_next_index_str(zheader_ptr, php_http_cs2zs(header_str, header_len));
+ rv = add_next_index_str(zheader_ptr, php_http_cs2zs(header_str, header_len));
} else {
ZVAL_STR(&zheader, php_http_cs2zs(header_str, header_len));
- if (SUCCESS != zend_hash_str_update(&stream_ctx->header, header_str, header_end - header_str, &zheader)) {
- return FAILURE;
- }
-
- *header_end = ':';
- return SUCCESS;
+ rv = zend_hash_update(&stream_ctx->header, header_key, &zheader)
+ ? SUCCESS : FAILURE;
}
+
+ zend_string_release(header_key);
+
+ return rv;
}
static ZEND_RESULT_CODE php_http_env_response_stream_set_header(php_http_env_response_t *r, const char *fmt, ...)
{
}
static ZEND_RESULT_CODE php_http_env_response_stream_finish(php_http_env_response_t *r)
{
- php_http_env_response_stream_ctx_t *stream_ctx = r->ctx;
+ php_http_env_response_stream_ctx_t *ctx = r->ctx;
- if (stream_ctx->finished) {
+ if (ctx->finished) {
return FAILURE;
}
- if (!stream_ctx->started) {
- if (SUCCESS != php_http_env_response_stream_start(stream_ctx)) {
+ if (!ctx->started) {
+ if (SUCCESS != php_http_env_response_stream_start(ctx)) {
return FAILURE;
}
}
- stream_ctx->finished = 1;
+ php_stream_flush(ctx->stream);
+ if (ctx->chunked && ctx->chunked_filter) {
+ php_stream_filter_flush(ctx->chunked_filter, 1);
+ ctx->chunked_filter = php_stream_filter_remove(ctx->chunked_filter, 1);
+ }
+
+ ctx->finished = 1;
return SUCCESS;
}
PHP_HTTP_ENV_RESPONSE_OBJECT_INIT(obj);
- php_http_message_object_init_body_object(obj);
- php_http_message_body_append(obj->message->body, ob_str, ob_len);
+ if (!obj->body) {
+ php_http_message_object_init_body_object(obj);
+ }
+
+ if (ob_flags & PHP_OUTPUT_HANDLER_CLEAN) {
+ php_stream_truncate_set_size(php_http_message_body_stream(obj->message->body), 0);
+ } else {
+ php_http_message_body_append(obj->message->body, ob_str, ob_len);
+ }
RETURN_TRUE;
}
}
php_http_expect(SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS(), "|O", &env_req, php_http_message_class_entry), invalid_arg, return);
set_option(getThis(), ZEND_STRL("request"), IS_OBJECT, env_req, 0);
- RETVAL_ZVAL_FAST(getThis());
+ RETVAL_ZVAL(getThis(), 1, 0);
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpEnvResponse_setContentType, 0, 0, 1)
php_http_expect(SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS(), "s!", &ct_str, &ct_len), invalid_arg, return);
set_option(getThis(), ZEND_STRL("contentType"), IS_STRING, ct_str, ct_len);
- RETVAL_ZVAL_FAST(getThis());
+ RETVAL_ZVAL(getThis(), 1, 0);
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpEnvResponse_setContentDisposition, 0, 0, 1)
php_http_expect(SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS(), "a", &zdisposition), invalid_arg, return);
zend_update_property(Z_OBJCE_P(getThis()), getThis(), ZEND_STRL("contentDisposition"), zdisposition);
- RETVAL_ZVAL_FAST(getThis());
+ RETVAL_ZVAL(getThis(), 1, 0);
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpEnvResponse_setContentEncoding, 0, 0, 1)
php_http_expect(SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS(), "l", &ce), invalid_arg, return);
set_option(getThis(), ZEND_STRL("contentEncoding"), IS_LONG, &ce, 0);
- RETVAL_ZVAL_FAST(getThis());
+ RETVAL_ZVAL(getThis(), 1, 0);
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpEnvResponse_setCacheControl, 0, 0, 1)
php_http_expect(SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS(), "s!", &cc_str, &cc_len), invalid_arg, return);
set_option(getThis(), ZEND_STRL("cacheControl"), IS_STRING, cc_str, cc_len);
- RETVAL_ZVAL_FAST(getThis());
+ RETVAL_ZVAL(getThis(), 1, 0);
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpEnvResponse_setLastModified, 0, 0, 1)
php_http_expect(SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS(), "l", &last_modified), invalid_arg, return);
set_option(getThis(), ZEND_STRL("lastModified"), IS_LONG, &last_modified, 0);
- RETVAL_ZVAL_FAST(getThis());
+ RETVAL_ZVAL(getThis(), 1, 0);
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpEnvResponse_isCachedByLastModified, 0, 0, 0)
php_http_expect(SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS(), "s!", &etag_str, &etag_len), invalid_arg, return);
set_option(getThis(), ZEND_STRL("etag"), IS_STRING, etag_str, etag_len);
- RETVAL_ZVAL_FAST(getThis());
+ RETVAL_ZVAL(getThis(), 1, 0);
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpEnvResponse_isCachedByEtag, 0, 0, 0)
char *header_name_str = NULL;
size_t header_name_len = 0;
- if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s!", &header_name_str, &header_name_len)) {
+ if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS(), "|s!", &header_name_str, &header_name_len)) {
if (!header_name_str || !header_name_len) {
header_name_str = "If-None-Match";
header_name_len = lenof("If-None-Match");
set_option(getThis(), ZEND_STRL("throttleDelay"), IS_DOUBLE, &delay, 0);
set_option(getThis(), ZEND_STRL("throttleChunk"), IS_LONG, &chunk_size, 0);
- RETVAL_ZVAL_FAST(getThis());
+ RETVAL_ZVAL(getThis(), 1, 0);
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpEnvResponse_setCookie, 0, 0, 1)
case IS_ARRAY:
list = php_http_cookie_list_from_struct(NULL, zcookie_new);
zcookie_new = &tmp;
- ZVAL_OBJ(zcookie_new, &php_http_cookie_object_new_ex(php_http_cookie_class_entry, list)->zo);
+ ZVAL_OBJECT(zcookie_new, &php_http_cookie_object_new_ex(php_http_cookie_class_entry, list)->zo, 0);
break;
default:
zs = zval_get_string(zcookie_new);
list = php_http_cookie_list_parse(NULL, zs->val, zs->len, 0, NULL);
+ zend_string_release(zs);
zcookie_new = &tmp;
- ZVAL_OBJ(zcookie_new, &php_http_cookie_object_new_ex(php_http_cookie_class_entry, list)->zo);
+ ZVAL_OBJECT(zcookie_new, &php_http_cookie_object_new_ex(php_http_cookie_class_entry, list)->zo, 0);
}
zend_restore_error_handling(&zeh);
set_cookie(getThis(), zcookie_new);
zval_ptr_dtor(zcookie_new);
- RETVAL_ZVAL_FAST(getThis());
+ RETVAL_ZVAL(getThis(), 1, 0);
}
ZEND_BEGIN_ARG_INFO_EX(ai_HttpEnvResponse_send, 0, 0, 0)