summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorJoe Orton <jorton@apache.org>2004-09-26 17:52:51 +0200
committerJoe Orton <jorton@apache.org>2004-09-26 17:52:51 +0200
commitc48cfec2fd867a5c3a74b03e40a34b0563d5f008 (patch)
treec40f8bd557ec84f9886597506d42c8f50c808368 /server
parentUse the Christian von Roques's idea that makes the election mechanism (diff)
downloadapache2-c48cfec2fd867a5c3a74b03e40a34b0563d5f008.tar.xz
apache2-c48cfec2fd867a5c3a74b03e40a34b0563d5f008.zip
* server/util_filter.c (ap_save_brigade): Handle an ENOTIMPL setaside
function correctly. * modules/generators/mod_cgi.c (cgi_handler): Revert r1.169, unnecessary CGI bucket lifetime kludge. PR: 31247 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105297 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server')
-rw-r--r--server/util_filter.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/server/util_filter.c b/server/util_filter.c
index 05c81063b4..a294248248 100644
--- a/server/util_filter.c
+++ b/server/util_filter.c
@@ -546,10 +546,21 @@ AP_DECLARE(apr_status_t) ap_save_brigade(ap_filter_t *f,
e = APR_BUCKET_NEXT(e))
{
rv = apr_bucket_setaside(e, p);
- if (rv != APR_SUCCESS
- /* ### this ENOTIMPL will go away once we implement setaside
- ### for all bucket types. */
- && rv != APR_ENOTIMPL) {
+
+ /* If the bucket type does not implement setaside, then
+ * (hopefully) morph it into a bucket type which does, and set
+ * *that* aside... */
+ if (rv == APR_ENOTIMPL) {
+ const char *s;
+ apr_size_t n;
+
+ rv = apr_bucket_read(e, &s, &n, APR_BLOCK_READ);
+ if (rv == APR_SUCCESS) {
+ rv = apr_bucket_setaside(e, p);
+ }
+ }
+
+ if (rv != APR_SUCCESS) {
return rv;
}
}