|
(note: I thought I sent this but never saw it show
up on the list. If it is a repeat, I humbly regret the
transgression)
Hi all,
I have a question on ap_content_length_filter(). I ended up wandering through this function while chasing a bug in a module. In short, I was trying to figure out why I would get a content length other than the one I thought I was setting in my module. Turns out I did have a bug in the module (a bucket size was off by one). A question was raised in my mind however.... If a generator module sets (using ap_set_content_length() of course), shouldn't ap_content_length_filter() honor that ? In that function there is the line: ctx->compute_len = 1; /* Assume we will compute the length */ Is this a good assumption ? I would think that if a generator has set the value, then the value should be left alone. If a filter does something that would change the length, it should unset/reset the value. If no value is set, then ap_content_length_filter() should compute the content-length It should be noted that ap_content_length_filter only overrides the content-length if the content length falls below a send threshold (in most cases). Dave Hill |
