perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philippe M. Chiasson" <go...@cpan.org>
Subject Re: [patch] C implementation of $r->content + rfc on the name
Date Mon, 19 May 2003 13:52:46 GMT
On Mon, 2003-05-19 at 10:50, Joe Schaefer wrote:
> "Philippe M. Chiasson" <gozer@cpan.org> writes:
> 
> [...]
> 
> > Well, the thing that bothers me is this.
> > 
> > My code uses $r->content and all works fine. Then I install some aaa
> > handler that calls $r->content before me. All of a sudden, my existing
> > code doesn't work anymore. 
> 
> That's exactly why people shouldn't be using $r->content,
> especially if they're coding something besides a content-handler.

Absolutely! I would tend to agree with Doug's previous reasons why
$r->content shouldn't exist in mp. But if we do chose to implement,
I think it should at least be a bit more 'smarter' that it's implemented
in mp1.

> Encouraging authors to pull the POST data out of the filter chain
> prematurely, and maybe stuff it into a request note, is IMHO not 
> goodness.  Especially not for an aaa handler; it'll certainly
> wind up breaking modules that are based on apreq-2.

Well, then what is the better solution if 2 different modules need
access to the POSTed data (I didn't look at how apreq handles this) ?

I agree that stuffing potentially Megabytes in pnotes is far from ideal.

I would many times over prefer users to use something similar to
should_client_block(). But if enough users of mp _want_ to have
$r->content, we need a _good_ way of achieving that (or a better excuse
not to do it: "nevermind that, just use libapreq2 and it'll be even
simpler/faster")

Gozer out.

-- 
-- -----------------------------------------------------------------------------
Philippe M. Chiasson /gozer\@(cpan|ectoplasm)\.org/ 88C3A5A5 (122FF51B/C634E37B)
http://gozer.ectoplasm.org/    F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3 A5A5
Q: It is impossible to make anything foolproof because fools are so ingenious.
perl -e'$$=\${gozer};{$_=unpack(P7,pack(L,$$));/^JAm_pH\n$/&&print||$$++&&redo}'

Mime
View raw message