Re: A few questions on Input Filters

2012-01-13 Thread Joe Lewis

On 01/13/2012 09:24 AM, Martin Townsend wrote:

Thanks Joe for the info, my input filter is now behaving itself again.
I've not seen any FLUSH buckets yet so I doubt I will as we are 
running the bare minimum of modules.  I'll let you know if I do though.
One last question, when I don't see the EOS bucket should I return a 
certain APR_ error code to say the POST request hasn't finished yet. 
I'm currently return APR_OK and this seems to work.


Cheers,
Martin.


Leave it as OK.  If you return a different APR_ error, it could cause 
the entire request to hang.


By returning OK, you are simply stating that your function has finished 
what it was passed, and all is well.


Joe
--
www.silverhawk.net


Re: A few questions on Input Filters

2012-01-13 Thread Nick Kew
On Wed, 11 Jan 2012 11:17:30 +
Martin Townsend martin.towns...@power-oasis.com wrote:

 Hi,
 [chop]

One point that Joe omitted to mention is that since input
filtering is a PULL API, it's entirely up to your filter
how much data to pull before returning to its upstream.
If your filter can't deal with partial data, it can block for
as long as necessary to read more.  With just a couple of Kb 
to handle it's not exactly going to be a performance hit!

Regarding the flush buckets, conceptually I'd expect they
might feature if you were handling streaming data, or
maybe multipart uploads, or some extension to the HTTP
protocol.  Maybe there's some such application- or ptotocol-
oriented filter in your chain?

-- 
Nick Kew