Cliff Woolley wrote:
> > t_buck = apr_bucket_heap_create(cntx->error_str, \
> > - ctx->error_length, 1, &e_wrt); \
> > + cntx->error_length, 1, &e_wrt); \
> > APR_BUCKET_INSERT_BEFORE(h_ptr, t_buck); \
> > \
> > if (ins_head == NULL) { \
>
> PS: This is a nit, since it's a matter of performance in the error path,
> but why on earth does the CREATE_ERROR_BUCKET macro create a copy-to-heap
> heap bucket for the error message?? The message is either a const string
> if the default is used or essentially const (allocated from cmd->pool) if
> a custom one is used. Sounds like a good place to use an immortal bucket
> if you ask me.
I believe that in an original version I used an immortal bucket here and
had to change it for some reason, but I can't remember why. I might be
thinking of one of the other places in the code where buckets are created
though. Whether it was this code or some other code I seem to recall that
the reason for the change had to do with what the code around it did, like
maybe something to do with mixing immortal buckets with other types. If I
recall correctly the change was recommended by Ryan.
Sorry I can't recall the history with more clarity.
--
Paul J. Reder
-----------------------------------------------------------
"The strength of the Constitution lies entirely in the determination of each
citizen to defend it. Only if every single citizen feels duty bound to do
his share in this defense are the constitutional rights secure."
-- Albert Einstein