summaryrefslogtreecommitdiff
path: root/sapi/apache/mod_php4.c
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/apache/mod_php4.c')
-rw-r--r--sapi/apache/mod_php4.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/sapi/apache/mod_php4.c b/sapi/apache/mod_php4.c
index 9b7f2a2f57..246312be38 100644
--- a/sapi/apache/mod_php4.c
+++ b/sapi/apache/mod_php4.c
@@ -124,7 +124,7 @@ void php_save_umask(void)
}
-static int zend_apache_ub_write(const char *str, uint str_length)
+static int sapi_apache_ub_write(const char *str, uint str_length)
{
int ret;
SLS_FETCH();
@@ -143,6 +143,17 @@ static int zend_apache_ub_write(const char *str, uint str_length)
}
+
+static void sapi_apache_flush(void *server_context)
+{
+#if MODULE_MAGIC_NUMBER > 19970110
+ rflush((request_rec *) server_context);
+#else
+ bflush((request_rec *) server_context->connection->client);
+#endif
+}
+
+
int sapi_apache_read_post(char *buffer, uint count_bytes SLS_DC)
{
uint total_read_bytes=0, read_bytes;
@@ -217,7 +228,9 @@ static sapi_module_struct sapi_module = {
php_module_startup, /* startup */
php_module_shutdown_wrapper, /* shutdown */
- zend_apache_ub_write, /* unbuffered write */
+ sapi_apache_ub_write, /* unbuffered write */
+ sapi_apache_flush, /* flush */
+
php_error, /* error handler */