Commit 701665c7 authored by Ryan Bloom's avatar Ryan Bloom
Browse files

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.
Submitted by:	Greg Stein


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87883 13f79535-47bb-0310-9956-ffa450edef68
parent 7ea82100
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
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
+6 −6
Original line number Diff line number Diff line
@@ -63,10 +63,8 @@
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;
}

@@ -80,9 +78,11 @@ AP_DECLARE(apr_bucket *) ap_bucket_make_error(apr_bucket *b, int error,
        return NULL;
    }
    h->status = error;
    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;