From af49e58f5155383a440041c77cc1ecbaf507fde7 Mon Sep 17 00:00:00 2001 From: Jani Taskinen Date: Fri, 12 Mar 2010 10:28:59 +0000 Subject: - Reverted r296062 and r296065 --- sapi/apache/mod_php5.c | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) (limited to 'sapi/apache/mod_php5.c') diff --git a/sapi/apache/mod_php5.c b/sapi/apache/mod_php5.c index 815fd48f6f..9711e3fa70 100644 --- a/sapi/apache/mod_php5.c +++ b/sapi/apache/mod_php5.c @@ -95,7 +95,7 @@ static void php_save_umask(void) static int sapi_apache_ub_write(const char *str, uint str_length TSRMLS_DC) { int ret=0; - + if (SG(server_context)) { ret = rwrite(str, str_length, (request_rec *) SG(server_context)); } @@ -137,7 +137,7 @@ static int sapi_apache_read_post(char *buffer, uint count_bytes TSRMLS_DC) if (!SG(read_post_bytes) && !ap_should_client_block(r)) { return total_read_bytes; } - + handler = signal(SIGPIPE, SIG_IGN); while (total_read_bytespool, NULL, php_apache_request_shutdown, php_request_shutdown_for_exec); @@ -401,7 +401,7 @@ static int sapi_apache_get_fd(int *nfd TSRMLS_DC) int fd; fd = r->connection->client->fd; - + if (fd >= 0) { if (nfd) *nfd = fd; return SUCCESS; @@ -416,9 +416,9 @@ static int sapi_apache_get_fd(int *nfd TSRMLS_DC) static int sapi_apache_force_http_10(TSRMLS_D) { request_rec *r = SG(server_context); - + r->proto_num = HTTP_VERSION(1,0); - + return SUCCESS; } /* }}} */ @@ -464,7 +464,7 @@ static void sapi_apache_child_terminate(TSRMLS_D) static sapi_module_struct apache_sapi_module = { "apache", /* name */ "Apache", /* pretty name */ - + php_apache_startup, /* startup */ php_module_shutdown_wrapper, /* shutdown */ @@ -579,8 +579,8 @@ static int php_apache_alter_ini_entries(php_per_dir_entry *per_dir_entry TSRMLS_ */ static char *php_apache_get_default_mimetype(request_rec *r TSRMLS_DC) { + char *mimetype; - if (SG(default_mimetype) || SG(default_charset)) { /* Assume output will be of the default MIME type. Individual scripts may change this later. */ @@ -628,7 +628,7 @@ static int send_php(request_rec *r, int display_source_mode, char *filename) if (per_dir_conf) { zend_hash_apply((HashTable *) per_dir_conf, (apply_func_t) php_apache_alter_ini_entries TSRMLS_CC); } - + /* If PHP parser engine has been turned off with an "engine off" * directive, then decline to handle this request */ @@ -696,8 +696,9 @@ static int send_parsed_php(request_rec * r) { int result = send_php(r, 0, NULL); TSRMLS_FETCH(); - - ap_table_setn(r->notes, "mod_php_memory_usage", ap_psprintf(r->pool, "%lu", zend_memory_peak_usage(1 TSRMLS_CC))); + + ap_table_setn(r->notes, "mod_php_memory_usage", + ap_psprintf(r->pool, "%lu", zend_memory_peak_usage(1 TSRMLS_CC))); return result; } @@ -859,7 +860,7 @@ static CONST_PREFIX char *php_apache_flag_handler_ex(cmd_parms *cmd, HashTable * bool_val[0] = '0'; } bool_val[1] = 0; - + return php_apache_value_handler_ex(cmd, conf, arg1, bool_val, mode); } /* }}} */ @@ -925,7 +926,7 @@ static void apache_php_module_shutdown_wrapper(void) #if MODULE_MAGIC_NUMBER >= 19970728 /* This function is only called on server exit if the apache API - * child_exit handler exists, so shutdown globally + * child_exit handler exists, so shutdown globally */ sapi_shutdown(); #endif -- cgit v1.2.1