Changes with Apache 2.0.14
+ *) Mod_include should always unset the content-length if the file is
+ going to be passed through send_parsed_content. There is no to
+ determine if the content will change before actually scanning the
+ entire content. It is far safer to just remove the C-L as long
+ as we are scanning it. [Ryan Bloom]
+
*) Fix content-length computation. We ONLY compute a content-length if
We are not in a 1.1 request and we cannot chunk, and this is a keepalive
or we already have all the data. [Ryan Bloom]
return;
}
- /* Even if I don't generate any content, I know at this point that
- * I will at least remove the discovered SSI tag, thereby making
- * the content shorter than it was. This is the safest point I can
- * find to unset this field.
- */
- apr_table_unset(f->r->headers_out, "Content-Length");
-
/* Can't destroy the tag buckets until I'm done processing
* because the combined_tag might just be pointing to
* the contents of a single bucket!
*/
+ /* Always unset the content-length. There is no way to know if
+ * the content will be modified at some point by send_parsed_content.
+ * It is very possible for us to not find any content in the first
+ * 9k of the file, but still have to modify the content of the file.
+ * If we are going to pass the file through send_parsed_content, then
+ * the content-length should just be unset.
+ */
+ apr_table_unset(f->r->headers_out, "Content-Length");
+
send_parsed_content(&b, r, f);
if (parent) {