bucket length is 0, and a read returns NULL data. If one of these
buckets is passed down after the headers are sent, this data will
just be ignored.
Submitted by: Greg Stein
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87883
13f79535-47bb-0310-9956-
ffa450edef68
Changes with Apache 2.0b1
+ *) Make the error bucket a real meta-data bucket. This means that the
+ bucket length is 0, and a read returns NULL data. If one of these
+ buckets is passed down after the headers are sent, this data will
+ just be ignored. [Greg Stein]
+
*) The prefork MPM wasn't killing child processes correctly if a restart
signal was received while the process was serving a request. The child
process would become the equivalent of a second parent process. If
static apr_status_t error_read(apr_bucket *b, const char **str,
apr_size_t *len, apr_read_type_e block)
{
- ap_bucket_error *e = b->data;
-
- *str = e->start;
- *len = b->length;
+ *str = NULL;
+ *len = 0;
return APR_SUCCESS;
}
return NULL;
}
h->status = error;
- h->start = apr_pstrdup(p, buf);
+ if (buf) {
+ h->start = apr_pstrdup(p, buf);
+ }
- b->length = strlen(h->start);
+ b->length = 0;
b->type = &ap_bucket_type_error;
b->data = h;
return b;