perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: mod_include #perl support
Date Fri, 02 May 2003 22:53:43 GMT
Geoffrey Young wrote:
> 
>> Very cool, Geoff!
>>
>> You had a tiny problem, you haven't called 
>> SPLIT_AND_PASS_PRETAG_BUCKETS. The patch below makes things working.
> 
> 
> you know, I didn't do that on purpose - mod_cgi only calls that with the 
> "cgi" option (where it relies on running the subrequest to calculate the 
> content) - the logic for the "cmd" option doesn't use it at all.  and I 
> actually did have that logic at one point, though.  I'll try it again.  
> hmph.

Yes, but you did *not* call a subrequest, so it makes it like "cgi" and not 
"cmd". When you call a sub-request you get the previous data flushed.

>> If so why don't you take the data from the tag create a bucket brigade 
>> in the XS and pass it to the handler. In that case you will allow to 
>> really have a filter. See what I mean? Parse the data as you do now, 
>> but don't push it into args, instead create a new bb in C and pass 
>> *it* to the handler in $bb.
> 
> 
> hmm, yeah I can try that.

I think this is very important, since if you do that, one doesn't have to 
learn a new thing (assuming that they already know filters) and they can use 
the streaming API instead of manipulating bucket brigades, which makes it much 
simpler to understand. And hey you don't even have to parse the args, just put 
them all in one bucket and let the user do the parsing.

>> - in tests you must check if the request has succeeded. we have some 
>> bug with -port select, and it was failing for me when I used it 
>> without any error indicating. To make things simple there is 
>> *_BODY_ASSERT shortcut. You can see it in the patch. It'll assert if 
>> the request has failed.
> 
> 
> I'll look into that.  I tend to use GET over GET_BODY* methods becuase I 
> typically examine things other than content (like the headers).  what 
> exactly was failing for you?  this may be a larger, unrelateed issue :)

That's unrelated to your work. It's a subtle problem with using -port select 
option.

__________________________________________________________________
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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message