summaryrefslogtreecommitdiff
path: root/sapi/cli/php_cli.c
diff options
context:
space:
mode:
authorDerick Rethans <derick@php.net>2003-05-26 18:33:20 +0000
committerDerick Rethans <derick@php.net>2003-05-26 18:33:20 +0000
commit33bed67b99c1e45681b17f407eba1f09aca485d1 (patch)
tree88446fa88adf79654a8e187ea2e38c6df4dc0972 /sapi/cli/php_cli.c
parent3d3416d10ec46b233dccdacc13330ac63281b39a (diff)
downloadphp-git-33bed67b99c1e45681b17f407eba1f09aca485d1.tar.gz
- Fixed a bug in reporting start-up errors with the CLI: No HTTP header shall
be shown.
Diffstat (limited to 'sapi/cli/php_cli.c')
-rw-r--r--sapi/cli/php_cli.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
index 422fe53a6e..5e5fdfd6cd 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -238,6 +238,13 @@ static char* sapi_cli_read_cookies(TSRMLS_D)
return NULL;
}
+static int sapi_cli_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC)
+{
+ /* We do nothing here, this function is needed to prevent that the fallback
+ * header handling is called. */
+ return SAPI_HEADER_SENT_SUCCESSFULLY;
+}
+
static void sapi_cli_send_header(sapi_header_struct *sapi_header, void *server_context TSRMLS_DC)
{
if (sapi_header) {
@@ -301,7 +308,7 @@ static sapi_module_struct cli_sapi_module = {
php_error, /* error handler */
NULL, /* header handler */
- NULL, /* send headers handler */
+ sapi_cli_send_headers, /* send headers handler */
sapi_cli_send_header, /* send header handler */
NULL, /* read POST data */