Re: mod_deflate handling of empty initial brigade

2010-06-03 Thread Paul Fee
Bryan McQuade wrote: Are there any cases where it's important for ap_pass_bridgade to pass on an empty brigade? Doesn't sound like it, but since this is a core library change I want to double check. When handling a CONNECT request, the response will have no body. In mod_proxy, the CONNECT

Re: mod_deflate handling of empty initial brigade

2010-06-03 Thread tokiley
Paul Fee wrote... Bryan McQuade wrote: Are there any cases where it's important for ap_pass_bridgade to pass on an empty brigade? Doesn't sound like it, but since this is a core library change I want to double check. When handling a CONNECT request, the response will have no body. In

Re: mod_deflate handling of empty initial brigade

2010-06-02 Thread Nick Kew
On 2 Jun 2010, at 10:49, Joe Orton wrote: Maybe we should have a strict API here rather than a loose one: filters MUST NOT pass an empty brigade down the filter chain. That's not really an API, it's a rule, and pretty-much unenforcable. I recollect one problem that bit some of my modules

Re: mod_deflate handling of empty initial brigade

2010-06-02 Thread Brian Pane
On Wed, Jun 2, 2010 at 3:37 AM, Nick Kew n...@webthing.com wrote: On 2 Jun 2010, at 10:49, Joe Orton wrote: Maybe we should have a strict API here rather than a loose one: filters MUST NOT pass an empty brigade down the filter chain. That's not really an API, it's a rule, and pretty-much

Re: mod_deflate handling of empty initial brigade

2010-06-02 Thread Nick Kew
On 2 Jun 2010, at 12:17, Brian Pane wrote: Wait a minute...why not just change the implementation of ap_pass_brigade so that it returns APR_SUCCESS immediately when passed an empty brigade? That would solve the problem globally. That's just too sensible for this thread :) -- Nick Kew

Re: mod_deflate handling of empty initial brigade

2010-06-02 Thread Bryan McQuade
:) Great idea Brian. I can submit a patch for this if it'd be helpful. Just let me know if you'd like us to prepare a patch for this. Are there any cases where it's important for ap_pass_bridgade to pass on an empty brigade? Doesn't sound like it, but since this is a core library change I want

Re: mod_deflate handling of empty initial brigade

2010-06-01 Thread Eric Covener
On Tue, Jun 1, 2010 at 10:39 AM, Brian Pane brianp...@gmail.com wrote: In a filter module I'm writing, it's possible for the first pass through the output filter to end up calling:    ap_pass_brigade(f-next, an_empty_brigade) If mod_deflate's output filter appears later in the output filter

Re: mod_deflate handling of empty initial brigade

2010-06-01 Thread Bryan McQuade
The guide to writing output filters says: https://httpd.apache.org/docs/trunk/developer/output-filters.html#invocation An output filter should never pass an empty brigade down the filter chain. But, for good defensive programming, filters should be prepared to accept an empty brigade, and do

RE: mod_deflate handling of empty initial brigade

2010-06-01 Thread Plüm, Rüdiger, VF-Group
-Original Message- From: Bryan McQuade Sent: Dienstag, 1. Juni 2010 16:54 To: dev@httpd.apache.org Cc: mdste...@google.com Subject: Re: mod_deflate handling of empty initial brigade The guide to writing output filters says: https://httpd.apache.org/docs/trunk/developer

Re: mod_deflate handling of empty initial brigade

2010-06-01 Thread Matthew Steele
On Tue, Jun 1, 2010 at 11:02 AM, Plüm, Rüdiger, VF-Group ruediger.pl...@vodafone.com wrote: The guide to writing output filters says: https://httpd.apache.org/docs/trunk/developer/output-filters.h tml#invocation An output filter should never pass an empty brigade down the filter chain. But,

Re: mod_deflate handling of empty initial brigade

2010-06-01 Thread Nick Kew
On 1 Jun 2010, at 15:53, Bryan McQuade wrote: According to this, mod_deflate should not pass the empty brigade along, and your module also should not be passing and empty brigade to mod_deflate. Eric, others, should we submit a patch to mod_deflate to change its behavior to be consistent

Re: mod_deflate handling of empty initial brigade

2010-06-01 Thread Matthew Steele
I went ahead and created a bug entry/patch to make the (trivial) change to mod_deflate to make it conform to the Guide to writing output filters: https://issues.apache.org/bugzilla/show_bug.cgi?id=49369 Brian, does this patch to mod_deflate fix your problem? Nick, does this change seem

Re: mod_deflate handling of empty initial brigade

2010-06-01 Thread Brian Pane
On Tue, Jun 1, 2010 at 10:28 AM, Matthew Steele mdste...@google.com wrote: I went ahead and created a bug entry/patch to make the (trivial) change to mod_deflate to make it conform to the Guide to writing output filters:  https://issues.apache.org/bugzilla/show_bug.cgi?id=49369 Brian, does