Changes with Apache 2.0.53
+ *) Correct handling of certain bucket types in ap_save_brigade, fixing
+ possible segfaults in mod_cgi with #include virtual. PR 31247.
+ [Joe Orton]
+
*) Allow for the use of --with-module=foo:bar where the ./modules/foo
directory is local only. Assumes, of course, that the required
files are in ./modules/foo, but makes it easier to statically
PR 24437
+1: minfrin, wrowe, jim
- *) Fix ap_save_brigade's handling of ENOTIMPL setaside functions.
- http://cvs.apache.org/viewcvs.cgi/httpd-2.0/server/util_filter.c?r1=1.100&r2=1.102
- PR: 31247
- +1: jorton, trawick, stoddard
-
*) mod_headers: Support {...}s tag for SSL variable lookup.
http://www.apache.org/~jorton/mod_headers-2.0-ssl.diff
+1: jorton, trawick
apr_bucket_brigade **b, apr_pool_t *p)
{
apr_bucket *e;
- apr_status_t rv;
+ apr_status_t rv, srv = APR_SUCCESS;
/* If have never stored any data in the filter, then we had better
* create an empty bucket brigade so that we can concat.
APR_RING_FOREACH(e, &(*b)->list, apr_bucket, link) {
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) {
- return rv;
+
+ /* 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) {
+ srv = rv;
+ /* Return an error but still save the brigade if
+ * ->setaside() is really not implemented. */
+ if (rv != APR_ENOTIMPL) {
+ return rv;
+ }
}
}
APR_BRIGADE_CONCAT(*saveto, *b);
- return APR_SUCCESS;
+ return srv;
}
AP_DECLARE_NONSTD(apr_status_t) ap_filter_flush(apr_bucket_brigade *bb,