On Mon, 3 Jun 2002, Justin Erenkrantz wrote: > > No need to test for this. You'll just get zero-length buckets. If an > > Um, I think the approach has been that you can't read from > metadata buckets. That they may give you data back or they may > not, but they certainly shouldn't be handled if you don't know > what to do with them. This comes out of what little I've seen > of the conversation with Cliff and Ryan. I may have it wrong, > but I think someone said at some point that metadata may indeed > respond to bucket_read with data, but that data shouldn't be > construed as part of the input stream.
Given the current implementation, APR_BUCKET_IS_METADATA(e) implies that e->length is 0 and apr_bucket_read(e) returns "". Skipping the read call if it's a metadata is nothing more than an optimization in this case. (You should throw in the check for len != 0, that's almost as good an optimization.) My feelings aren't hurt one way or the other by having this in. --Cliff
