William A. Rowe, Jr. wrote:
Plüm, Rüdiger, VF-Group wrote:
+ /*
+         * Optimization: If we are a HEAD request and bytes_sent is not zero
+         * it means that we have passed the content-length filter once and
+         * have more data to sent. This means that the content-length filter
+         * could not determine our content-length for the response to the
+         * HEAD request anyway (the associated GET request would deliver the
+         * body in chunked encoding) and we can stop compressing.
+         */

The content-length could've been set anyway - the simplest case being
a static file that's been "stat"ed.  Have we definitely unset it?

Is this really an optimization?  Sounds like correctness :)  And do we want
to also validate that Accept-Encoding: chunked is present?

No, deflate doesn't imply chunked encoding.

+        if (r->header_only && r->bytes_sent) {
+            ap_remove_output_filter(f);
+            return ap_pass_brigade(f->next, bb);
+        }

Other than comments above - +1!

Other than comments above, +0.5.  The other +half is still
contemplating giving control to the sysop - c.f. my previous
mail on the subject.

--
Nick Kew

Reply via email to