summaryrefslogtreecommitdiff
path: root/sapi/apache2filter
diff options
context:
space:
mode:
authorMark A. Hershberger <mah@debian.(none)>2009-03-25 00:35:28 -0400
committerMark A. Hershberger <mah@debian.(none)>2009-03-25 00:35:28 -0400
commitba50031707469046407a35b77a3cd81351e951b3 (patch)
tree5c03e723bdbfabae09d41a3ab1253dff41eeed4a /sapi/apache2filter
parent0a36161e13484a99ccf69bb38f206462d27cc6d6 (diff)
downloadphp-upstream/5.1.5.tar.gz
Imported Upstream version 5.1.5upstream/5.1.5
Diffstat (limited to 'sapi/apache2filter')
-rw-r--r--sapi/apache2filter/apache_config.c19
-rw-r--r--sapi/apache2filter/sapi_apache2.c6
2 files changed, 15 insertions, 10 deletions
diff --git a/sapi/apache2filter/apache_config.c b/sapi/apache2filter/apache_config.c
index 7dfe79c7f..384ab7b39 100644
--- a/sapi/apache2filter/apache_config.c
+++ b/sapi/apache2filter/apache_config.c
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: apache_config.c,v 1.34.2.1 2006/01/01 12:50:18 sniper Exp $ */
+/* $Id: apache_config.c,v 1.34.2.2 2006/06/09 16:29:45 mike Exp $ */
#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
@@ -128,28 +128,31 @@ static const char *php_apache_phpini_set(cmd_parms *cmd, void *mconfig,
void *merge_php_config(apr_pool_t *p, void *base_conf, void *new_conf)
{
- php_conf_rec *d = base_conf, *e = new_conf;
+ php_conf_rec *d = base_conf, *e = new_conf, *n = NULL;
php_dir_entry *pe;
php_dir_entry *data;
char *str;
uint str_len;
ulong num_index;
- phpapdebug((stderr, "Merge dir (%p) (%p)\n", base_conf, new_conf));
+ n = create_php_config(p, "merge_php_config");
+ zend_hash_copy(&n->config, &e->config, NULL, NULL, sizeof(php_dir_entry));
+
+ phpapdebug((stderr, "Merge dir (%p)+(%p)=(%p)\n", base_conf, new_conf, n));
for (zend_hash_internal_pointer_reset(&d->config);
zend_hash_get_current_key_ex(&d->config, &str, &str_len,
&num_index, 0, NULL) == HASH_KEY_IS_STRING;
zend_hash_move_forward(&d->config)) {
pe = NULL;
zend_hash_get_current_data(&d->config, (void **) &data);
- if (zend_hash_find(&e->config, str, str_len, (void **) &pe) == SUCCESS) {
+ if (zend_hash_find(&n->config, str, str_len, (void **) &pe) == SUCCESS) {
if (pe->status >= data->status) continue;
}
- zend_hash_update(&e->config, str, str_len, data, sizeof(*data), NULL);
- phpapdebug((stderr, "ADDING/OVERWRITING %s (%d vs. %d)\n", str,
- data->status, pe?pe->status:-1));
+ zend_hash_update(&n->config, str, str_len, data, sizeof(*data), NULL);
+ phpapdebug((stderr, "ADDING/OVERWRITING %s (%d vs. %d)\n", str, data->status, pe?pe->status:-1));
}
- return new_conf;
+
+ return n;
}
char *get_php_config(void *conf, char *name, size_t name_len)
diff --git a/sapi/apache2filter/sapi_apache2.c b/sapi/apache2filter/sapi_apache2.c
index 4df3267ce..22212dfbb 100644
--- a/sapi/apache2filter/sapi_apache2.c
+++ b/sapi/apache2filter/sapi_apache2.c
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sapi_apache2.c,v 1.136.2.1 2006/01/01 12:50:18 sniper Exp $ */
+/* $Id: sapi_apache2.c,v 1.136.2.2 2006/03/19 14:54:53 mike Exp $ */
#include <fcntl.h>
@@ -103,7 +103,7 @@ php_apache_sapi_header_handler(sapi_header_struct *sapi_header, sapi_headers_str
{
php_struct *ctx;
ap_filter_t *f;
- char *val;
+ char *val, *ptr;
ctx = SG(server_context);
f = ctx->r->output_filters;
@@ -114,6 +114,7 @@ php_apache_sapi_header_handler(sapi_header_struct *sapi_header, sapi_headers_str
sapi_free_header(sapi_header);
return 0;
}
+ ptr = val;
*val = '\0';
@@ -128,6 +129,7 @@ php_apache_sapi_header_handler(sapi_header_struct *sapi_header, sapi_headers_str
else
apr_table_add(ctx->r->headers_out, sapi_header->header, val);
+ *ptr = ':';
return SAPI_HEADER_ADD;
}