httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bojan Smojver <bo...@rexursive.com>
Subject Re: File buckets v. core_output_filter
Date Thu, 07 Aug 2003 12:09:41 GMT
BTW, the same thing happens with 2.0.47.

On Thu, 2003-08-07 at 21:49, Bojan Smojver wrote:
> Greetings everyone, it has been a while since I posted my ramblings
> about mod_logio... Anyway, it's that time of the year again :-)
> 
> I'm working on a new module and I have hit a strange problem in relation
> to core_output_filter, which is as far as I can see affecting my output.
> 
> Let's say I have a file that contains 300 bytes of something I'm
> interested in, then 10 bytes of rubbish, then 300 bytes of good stuff
> again and so on. The reason I'm picking 300 bytes here is because this
> number is greater than AP_MIN_SENDFILE_BYTES, which is 256.
> 
> So, I build up a brigade that looks like this:
> 
> FILE - POOL - FILE - POOL - FILE - EOS
> 
> The POOL buckets contains something useful instead of 10 bytes of
> rubbish that I would normally find in the file. The file buckets are
> chunks of the same file that I'm interested in.
> 
> When I pass this to output filters in my handler with
> ap_pass_brigade(r->output_filters,bb), I'm getting completely random
> output from. In other words, offsets of FILE buckets are completely
> screwed or buckets down show up at all.
> 
> If I, however, build a brigade like this:
> 
> FILE - FLUSH - POOL - FILE - FLUSH - POOL - FILE - FLUSH - EOS
> 
> then it all works fine. Also, if the good parts of my file are below 256
> bytes (or if I increase AP_MIN_SENDFILE_BYTES above the threshold),
> there are no problems at all.
> 
> I was testing this all this on 2.0.46, Red Hat Linux 9. Has anyone else
> observed anything like that? Has anything like that been fixed lately?
> 
> Or am I simply doing something really stupid...
-- 
Bojan


Mime
View raw message