compat with master
[m6w6/ext-http] / src / php_http_env_response.c
index 63246988a5b0ba0ac39588eab26de5d6a2660bad..740685767abb520a46485a649f2407ac12084f00 100644 (file)
@@ -346,10 +346,6 @@ static ZEND_RESULT_CODE php_http_env_response_send_head(php_http_env_response_t
                zval_ptr_dtor(zoption);
        }
 
-       if (ret != SUCCESS) {
-               return ret;
-       }
-
        if ((zoption = get_option(options, ZEND_STRL("responseCode"), &zoption_tmp))) {
                zend_long rc = zval_get_long(zoption);
 
@@ -852,7 +848,7 @@ static ZEND_RESULT_CODE php_http_env_response_stream_init(php_http_env_response_
        ctx = ecalloc(1, sizeof(*ctx));
 
        ctx->stream = init_arg;
-       ++GC_REFCOUNT(ctx->stream->res);
+       GC_ADDREF(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);