- php_http_env_get_response_headers(&message->hdrs TSRMLS_CC);
-#if PHP_VERSION_ID >= 50400
- if (php_output_get_level(TSRMLS_C)) {
- if (php_output_get_status(TSRMLS_C) & PHP_OUTPUT_SENT) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not fetch response body, output has already been sent at %s:%d", php_output_get_start_filename(TSRMLS_C), php_output_get_start_lineno(TSRMLS_C));
- goto error;
- } else if (SUCCESS != php_output_get_contents(&tval TSRMLS_CC)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not fetch response body");
- goto error;
- } else {
- php_http_message_body_append(message->body, Z_STRVAL(tval), Z_STRLEN(tval));
- zval_dtor(&tval);
- }
- }
-#else
- if (OG(ob_nesting_level)) {
- if (php_get_output_start_filename(TSRMLS_C)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not fetch response body, output has already been sent at %s:%d", php_get_output_start_filename(TSRMLS_C), php_get_output_start_lineno(TSRMLS_C));
+ php_http_env_get_response_headers(&message->hdrs);
+ if (php_output_get_level()) {
+ if (php_output_get_status() & PHP_OUTPUT_SENT) {
+ php_error_docref(NULL, E_WARNING, "Could not fetch response body, output has already been sent at %s:%d", php_output_get_start_filename(), php_output_get_start_lineno());
+