httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Covener <cove...@gmail.com>
Subject Re: HEAD response's Content-Length stripped when zero
Date Wed, 29 Apr 2015 12:46:27 GMT
On Wed, Apr 29, 2015 at 8:19 AM, Yann Ylavic <ylavic.dev@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?

-- 
Eric Covener
covener@gmail.com

Mime
View raw message