cvs: php4(PHP_4_2_0) /sapi/apache2filter sapi_apache2.c
| From: | Sterling Hughes | Date: | Fri, 05 Apr 2002 21:23:30 +0000 |
| Subject: | cvs: php4(PHP_4_2_0) /sapi/apache2filter sapi_apache2.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-10914@lists.php.net to get a copy of this message | ||
sterling Fri Apr 5 16:23:30 2002 EDT
Modified files: (Branch: PHP_4_2_0)
/php4/sapi/apache2filter sapi_apache2.c
Log:
MFH changes per doug's request
Index: php4/sapi/apache2filter/sapi_apache2.c
diff -u php4/sapi/apache2filter/sapi_apache2.c:1.61.2.1
php4/sapi/apache2filter/sapi_apache2.c:1.61.2.2
--- php4/sapi/apache2filter/sapi_apache2.c:1.61.2.1 Thu Mar 14 05:57:00 2002
+++ php4/sapi/apache2filter/sapi_apache2.c Fri Apr 5 16:23:30 2002
@@ -48,6 +48,7 @@
{
apr_bucket *b;
apr_bucket_brigade *bb;
+ apr_bucket_alloc_t *ba;
php_struct *ctx;
uint now;
@@ -55,10 +56,11 @@
if (str_length == 0) return 0;
- bb = apr_brigade_create(ctx->f->r->pool);
+ ba = ctx->f->r->connection->bucket_alloc;
+ bb = apr_brigade_create(ctx->f->r->pool, ba);
while (str_length > 0) {
now = MIN(str_length, 4096);
- b = apr_bucket_transient_create(str, now);
+ b = apr_bucket_transient_create(str, now, ba);
APR_BRIGADE_INSERT_TAIL(bb, b);
str += now;
str_length -= now;
@@ -161,6 +163,7 @@
{
php_struct *ctx = server_context;
apr_bucket_brigade *bb;
+ apr_bucket_alloc_t *ba;
apr_bucket *b;
if (!server_context)
@@ -171,8 +174,9 @@
* all further flush buckets.
*/
- bb = apr_brigade_create(ctx->f->r->pool);
- b = apr_bucket_flush_create();
+ ba = ctx->f->r->connection->bucket_alloc;
+ bb = apr_brigade_create(ctx->f->r->pool, ba);
+ b = apr_bucket_flush_create(ba);
APR_BRIGADE_INSERT_TAIL(bb, b);
if (ap_pass_brigade(ctx->f->next, bb) != APR_SUCCESS) {
php_handle_aborted_connection();
@@ -234,7 +238,7 @@
if (ctx == NULL) { \
/* Initialize filter context */ \
SG(server_context) = ctx = apr_pcalloc(f->r->pool, sizeof(*ctx)); \
- ctx->bb = apr_brigade_create(f->c->pool); \
+ ctx->bb = apr_brigade_create(f->c->pool, f->c->bucket_alloc); \
}
static int php_input_filter(ap_filter_t *f, apr_bucket_brigade *bb,
@@ -383,7 +387,7 @@
#define PHP_NO_DATA "The PHP Filter did not receive suitable input data"
- eos = apr_bucket_transient_create(PHP_NO_DATA, sizeof(PHP_NO_DATA)-1);
+ eos = apr_bucket_transient_create(PHP_NO_DATA, sizeof(PHP_NO_DATA)-1,
f->c->bucket_alloc);
APR_BRIGADE_INSERT_HEAD(bb, eos);
}
}
@@ -392,7 +396,7 @@
SG(server_context) = 0;
/* Pass EOS bucket to next filter to signal end of request */
- eos = apr_bucket_eos_create();
+ eos = apr_bucket_eos_create(f->c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(bb, eos);
return ap_pass_brigade(f->next, bb);