On Wed, Apr 29, 2015 at 3:39 PM, Yann Ylavic <ylavic....@gmail.com> wrote:
> On Wed, Apr 29, 2015 at 3:17 PM, Yann Ylavic <ylavic....@gmail.com> wrote:
>> On Wed, Apr 29, 2015 at 2:46 PM, Eric Covener <cove...@gmail.com> wrote:
>>> On Wed, Apr 29, 2015 at 8:19 AM, Yann Ylavic <ylavic....@gmail.com> wrote:
>>>> Hence how about removing this whole block (is there any module today
>>>> "outsmarting" httpd that cannot be considered as buggy?) or least
>>>> disable it for forwarded responses, eg:
>>>>
>>>> Index: modules/http/http_filters.c
>>>> ===================================================================
>>>> --- modules/http/http_filters.c    (revision 1676716)
>>>> +++ modules/http/http_filters.c    (working copy)
>>>> @@ -1292,6 +1292,7 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_http_heade
>>>>       * The default (unset) behavior is to squelch the C-L in this case.
>>>>       */
>>>>      if (r->header_only
>>>> +        && !r->proxyreq
>>>>          && (clheader = apr_table_get(r->headers_out, "Content-Length"))
>>>>          && !strcmp(clheader, "0")
>>>>          && conf->http_cl_head_zero != AP_HTTP_CL_HEAD_ZERO_ENABLE) {
>>>
>>>
>>> Maybe we could remember here if the CL was set by
>>> ap_content_length_filter or someone else?
>>>
>>
>> Yes, I first thought about this, hence checking r->clength instead,
>
> Hmm, I have read ap_content_length_filter() instead of
> ap_set_content_length(), please forget about my previous answer(s)...
> I need to think more about this.

Actually I found http://svn.apache.org/r1554303 which make it configurable.
Maybe we can backport it instead (why a MAJOR bump?? I'd like to see
it in 2.2.x too...).
I'd argue that the default should be "HttpContentLengthHeadZero on"
though (at least in trunk), still users of buggy/legacy modules could
turn it off.

Reply via email to