[prev in list] [next in list] [prev in thread] [next in thread]
List: apache-modperl
Subject: Re: [mp2] $r->senfile() curiosity
From: Stas Bekman <stas () stason ! org>
Date: 2004-06-29 22:56:52
Message-ID: 40E1F3B4.3030009 () stason ! org
[Download RAW message or body]
Stas Bekman wrote:
> Nicholas Studt wrote:
>
>> I don't know if this is a bug, or if I don't understand how bucket
>> brigades work. I have some code which does the following:
>>
>> $r->print( "First" );
>> $r->sendfile( "/any/file" );
>> $r->print( "Last" );
>>
>> This Produces:
>> <the contents of /any/file>
>> First
>> Last
>>
>> I thought it should produce:
>> First
>> <the contents of /and/file>
>> Last
>>
>> When I add an $r->rflush immediately before the sendfile the behavior is
>> as I expect, but should the rflush be required?
>>
>> I am running perl 5.8.3, httpd 2.0.49 and have seen this behavior in
>> 1.99_12 and 1.99_14.
>
>
> Yes, there is a discrepancy between print() and sendfile(), the latter,
> implemented by Apache, has no idea we are buffering IO on the modperl
> side. So it's probably a good idea to fix the modperl sendfile wrapper
> to call rflush, to have it DWIM.
Now it's in cvs.
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic