#include "php_http_std_defs.h"
#include "php_http_api.h"
#include "php_http_headers_api.h"
+#include "php_http_send_api.h"
#ifdef ZEND_ENGINE_2
# include "php_http_exception_object.h"
}
/* }}} */
+/* {{{ STATUS http_exit(int, char*) */
+STATUS _http_exit_ex(int status, char *header, zend_bool free_header TSRMLS_DC)
+{
+ if (SUCCESS != http_send_status_header(status, header)) {
+ http_error_ex(E_WARNING, HTTP_E_HEADER, "Failed to exit with status/header: %d - %s", status, header ? header : "");
+ if (free_header && header) {
+ efree(header);
+ }
+ return FAILURE;
+ }
+ if (free_header && header) {
+ efree(header);
+ }
+ zend_bailout();
+ /* fake */
+ return SUCCESS;
+}
+/* }}} */
+
/* {{{ zval *http_get_server_var_ex(char *, size_t) */
PHP_HTTP_API zval *_http_get_server_var_ex(const char *key, size_t key_size, zend_bool check TSRMLS_DC)
{