Re: HEAD response's Content-Length stripped when zero

2015-05-07 Thread Yann Ylavic
On Wed, Apr 29, 2015 at 2:46 PM, Eric Covener wrote: > > Maybe we could remember here if the CL was set by > ap_content_length_filter or someone else? I finally committed (in r1678215) a fix that moves all the logic in ap_content_length_filter(). Thanks, Yann.

Re: HEAD response's Content-Length stripped when zero

2015-04-29 Thread Yann Ylavic
(sorry for the patches spam / confused proposal) On Wed, Apr 29, 2015 at 6:07 PM, Yann Ylavic wrote: > We could also avoid the note by setting r->clength = -1 instead in > ap_content_length_filter(). Another candidate could be r->sent_bodyct = 1, eg: Index: server/protocol.c ===

Re: HEAD response's Content-Length stripped when zero

2015-04-29 Thread Yann Ylavic
On Wed, Apr 29, 2015 at 2:46 PM, Eric Covener wrote: > On Wed, Apr 29, 2015 at 8:19 AM, Yann Ylavic 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: >> >>

Re: HEAD response's Content-Length stripped when zero

2015-04-29 Thread Yann Ylavic
On Wed, Apr 29, 2015 at 3:39 PM, Yann Ylavic wrote: > On Wed, Apr 29, 2015 at 3:17 PM, Yann Ylavic wrote: >> On Wed, Apr 29, 2015 at 2:46 PM, Eric Covener wrote: >>> On Wed, Apr 29, 2015 at 8:19 AM, Yann Ylavic wrote: Hence how about removing this whole block (is there any module today >>>

Re: HEAD response's Content-Length stripped when zero

2015-04-29 Thread Yann Ylavic
On Wed, Apr 29, 2015 at 3:17 PM, Yann Ylavic wrote: > On Wed, Apr 29, 2015 at 2:46 PM, Eric Covener wrote: >> On Wed, Apr 29, 2015 at 8:19 AM, Yann Ylavic wrote: >>> Hence how about removing this whole block (is there any module today >>> "outsmarting" httpd that cannot be considered as buggy?)

Re: HEAD response's Content-Length stripped when zero

2015-04-29 Thread Yann Ylavic
On Wed, Apr 29, 2015 at 3:17 PM, Yann Ylavic wrote: > 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

Re: HEAD response's Content-Length stripped when zero

2015-04-29 Thread Yann Ylavic
On Wed, Apr 29, 2015 at 2:46 PM, Eric Covener wrote: > On Wed, Apr 29, 2015 at 8:19 AM, Yann Ylavic 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: >> >>

Re: HEAD response's Content-Length stripped when zero

2015-04-29 Thread Eric Covener
On Wed, Apr 29, 2015 at 8:19 AM, Yann Ylavic 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 >

HEAD response's Content-Length stripped when zero

2015-04-29 Thread Yann Ylavic
Due to ap_http_header_filter(): /* This is a hack, but I can't find anyway around it. The idea is that * we don't want to send out 0 Content-Lengths if it is a head request. * This happens when modules try to outsmart the server, and return * if they see a HEAD request. Apache