sniper Thu Mar 27 08:16:34 2003 EDT
Modified files: (Branch: PHP_4_3)
/php4/sapi/apache2handler sapi_apache2.c
Log:
MFH
Index: php4/sapi/apache2handler/sapi_apache2.c
diff -u php4/sapi/apache2handler/sapi_apache2.c:1.1.2.5
php4/sapi/apache2handler/sapi_apache2.c:1.1.2.6
--- php4/sapi/apache2handler/sapi_apache2.c:1.1.2.5 Mon Mar 24 20:34:39 2003
+++ php4/sapi/apache2handler/sapi_apache2.c Thu Mar 27 08:16:34 2003
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sapi_apache2.c,v 1.1.2.5 2003/03/25 01:34:39 iliaa Exp $ */
+/* $Id: sapi_apache2.c,v 1.1.2.6 2003/03/27 13:16:34 sniper Exp $ */
#include <fcntl.h>
@@ -71,6 +71,7 @@
apr_bucket_brigade *brigade;
request_rec *r;
php_struct *ctx;
+ char *copy_str;
if (str_length == 0) {
return 0;
@@ -80,18 +81,11 @@
r = ctx->r;
brigade = ctx->brigade;
- bucket = apr_bucket_transient_create(str, str_length,
- r->connection->bucket_alloc);
+ copy_str = apr_pmemdup( r->pool, str, str_length+1);
+ bucket = apr_bucket_pool_create(copy_str, str_length, r->pool,
r->connection->bucket_alloc);
+
APR_BRIGADE_INSERT_TAIL(brigade, bucket);
- /* Add a Flush bucket to the end of this brigade, so that
- * the transient buckets above are more likely to make it out
- * the end of the filter instead of having to be copied into
- * someone's setaside.
- */
- bucket = apr_bucket_flush_create(r->connection->bucket_alloc);
- APR_BRIGADE_INSERT_TAIL(brigade, bucket);
-
if (ap_pass_brigade(r->output_filters, brigade) != APR_SUCCESS) {
php_handle_aborted_connection();
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php