error_bucket.c revision 3d81f57512275ca06a60a9bcbd23c1f8b429fdf2
/* Copyright 2001-2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "http_protocol.h"
#include "apr_buckets.h"
#include "apr_strings.h"
#include <strings.h>
#endif
{
*len = 0;
return APR_SUCCESS;
}
static void error_bucket_destroy(void *data)
{
ap_bucket_error *h = data;
if (apr_bucket_shared_destroy(h)) {
apr_bucket_free(h);
}
}
const char *buf, apr_pool_t *p)
{
ap_bucket_error *h;
h = apr_bucket_alloc(sizeof(*h), b->list);
b = apr_bucket_shared_make(b, h, 0, 0);
b->type = &ap_bucket_type_error;
return b;
}
apr_pool_t *p,
{
APR_BUCKET_INIT(b);
b->free = apr_bucket_free;
}
};