httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Prud'hommeaux" <e...@w3.org>
Subject Re: cvs commit: httpd-2.0/modules/http http_protocol.c
Date Mon, 27 Aug 2001 14:16:12 GMT
On Sun, Aug 26, 2001 at 05:20:40PM -0700, Greg Stein wrote:
> On Sun, Aug 26, 2001 at 03:18:41PM -0700, Ryan Bloom wrote:
> > On Sunday 26 August 2001 12:54, Doug MacEachern wrote:
> > > On Sun, 26 Aug 2001, Marc Slemko wrote:
> > > > hang on, is this about keepalives or chunked encoding?
> > >
> > > both.
> > >
> > > the check always fails because ap_content_length_filter has set content
> > > length before ap_set_keepalive is called.  the right fix would probably be
> > > to check http/1.1-oneness eariler and remove (or not add) the
> > > ap_content_length_filter if r->chunked.
> > 
> > Can't do that.  The content-length filter always computes the full content length,
> > even if it isn't put in the response.  That way, we can log it correctly.
> 
> I'd prefer to log it as "0" or somesuch, rather than buffer the response
> just for the sake of logging.
> 
> Not of a particular mind here, but it *does* seem expensive to buffer just
> for logging's sake.
> 
> Thoughts?

I'd like to see ap_read_request and ap_set_sub_req_protocol set
r->clength to -1 or AP_CONTENT_LENGTH_UNSET and use that to
distinguish an empty response from one that hasn't had its content
length set.

I'm screwing around with some packaging filters which end up computing
the content length while they're at it. Unless I remove
ap_content_length_filter from the filter chain, it re-walks the
brigade. I'm a little leary of removing it by name ("CONTENT-LENGTH")
as it's not a constant and may change from version to version. I'd
like to just leave it alone, set the clength, and count on it to
    if (f->r->clength != AP_CONTENT_LENGTH_UNSET)
	return ap_pass_brigade(f->next, b)

Reasonable? Crazy?

-- 
-eric

(eric@w3.org)
Feel free to forward this message to any list for any purpose other than
email address distribution.

Mime
View raw message