Hi, all; I'm hoping just for a quick sanity check here... when consuming buckets from the brigade inside a connection filter, I've seen that the bucket length doesn't *appear* to accurately represent what data has been made available when SSL is used.
const char *tmp_buf; apr_size_t nbytes; apr_bucket_read(b, &tmp_buf, &nbytes, APR_BLOCK_READ); The particular scenario is that apr_bucket_read tells me that 11 bytes were read according to nbytes... but a print of the string stashed in the buffer shows many more. In fact, all data that should be available at this time appears to be there (about as I would expect). This seems to only happen when using SSL, FWIW. I consistently see 11 bytes as being read by apr_bucket_read... but all 48 expected bytes are there (strlen as well as any other method of examining the input concurs). I'm sure I've made a goofy assumption or am thinking about this wrong somewhere... but the mistake in my understanding escapes me. Any thoughts? P.S. For context: I'm working on teaching mod_remoteip how to consume PROXY protocol headers. This is a somewhat odd edge case where a connection filter must be inserted before SSL... but that doesn't appear to be the problem since I'm seeing the SSL handshake init (\x16\x03) right after the raw bytes I'm wanting. P.P.S. All the best to everyone during this holiday season! -- Daniel Ruggeri
