You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by JR Mayberry <jr...@e-vend.net> on 2001/03/13 01:05:16 UTC

to clarify (getting what was printed in PerlHandler)

a way to do it transparently...(ie: not changing code)

i realize there are ways to do it otherwise..



Re: to clarify (getting what was printed in PerlHandler)

Posted by Robert Landrum <rl...@capitoladvantage.com>.
Well, the first time someone downloads a 100MB file from your site, 
you'll understand why apache doesn't save what it sends to the 
browser.

The other solution is to assemble your outout into some sort of 
scalar, then check it within your handler and save whatever it is 
you're looking for into pnotes to be used in the post-handler.

Just a thought...

Robert Landrum

>It's not really as plug and play as I was looking for..
>
>I'm surprised that theres no built in functionality to allow any of the
>post-handler phases to be able to retreive what was dumped out...
>
>oh well..
>
>----- Original Message -----
>From: "Matt Sergeant" <ma...@sergeant.org>
>To: "JR Mayberry" <jr...@e-vend.net>
>Cc: "Ken Williams" <ke...@forum.swarthmore.edu>; <mo...@apache.org>
>Sent: Tuesday, March 13, 2001 10:23 AM
>Subject: Re: to clarify (getting what was printed in PerlHandler)
>
>
>> On Tue, 13 Mar 2001, JR Mayberry wrote:
>>
>> > I actually dont want to change whats outgoing -- I just want to know
>what it
>> > is..
>>
>> And the answer remains the same. Apache::Filter.
>>
>> --
>> <Matt/>
>>
>>     /||    ** Founder and CTO  **  **   http://axkit.com/     **
>>    file://||    **  AxKit.com Ltd   **  ** XML Application Serving **
>>   // ||    ** http://axkit.org **  ** XSLT, XPathScript, XSP  **
>>  // \\| // ** mod_perl news and resources: http://take23.org  **
>>      \\//
>>      //\\
>>     //  \\


--
Warning: The contents of this message are made of bits which may or may not
be an accurate representation of my thoughts.

Re: to clarify (getting what was printed in PerlHandler)

Posted by JR Mayberry <jr...@e-vend.net>.
It's only saving it up until that request is done with..

I put it in a pnote..works fine..



----- Original Message ----- 
From: "Ken Williams" <ke...@forum.swarthmore.edu>
To: "JR Mayberry" <jr...@e-vend.net>
Cc: <mo...@apache.org>
Sent: Tuesday, March 13, 2001 2:56 PM
Subject: Re: to clarify (getting what was printed in PerlHandler)


> jr.mayberry@e-vend.net (JR Mayberry) wrote:
> >It's not really as plug and play as I was looking for..
> >
> >I'm surprised that theres no built in functionality to allow any of the
> >post-handler phases to be able to retreive what was dumped out...
> 
> If you think about it, it would be a terrible idea to allow the kind of
> thing you're looking for.  It would mean that when the programmer asks
> the output to be sent to the user, the web server instead doesn't send
> it, but piles it up somewhere just in case the programmer decides that
> he/she might want to look at it again.  If the content is large, it
> would be a huge waste of memory resources, or of disk access (if
> cached), or the like.
> 
> If you want to re-access the output you sent, you'll have to collect it
> yourself, or use the efforts that I and others have put into modules
> like Apache::Filter, which makes it easy.
> 
> 
>   -------------------                            -------------------
>   Ken Williams                             Last Bastion of Euclidity
>   ken@forum.swarthmore.edu                            The Math Forum


Re: to clarify (getting what was printed in PerlHandler)

Posted by Ken Williams <ke...@forum.swarthmore.edu>.
jr.mayberry@e-vend.net (JR Mayberry) wrote:
>It's not really as plug and play as I was looking for..
>
>I'm surprised that theres no built in functionality to allow any of the
>post-handler phases to be able to retreive what was dumped out...

If you think about it, it would be a terrible idea to allow the kind of
thing you're looking for.  It would mean that when the programmer asks
the output to be sent to the user, the web server instead doesn't send
it, but piles it up somewhere just in case the programmer decides that
he/she might want to look at it again.  If the content is large, it
would be a huge waste of memory resources, or of disk access (if
cached), or the like.

If you want to re-access the output you sent, you'll have to collect it
yourself, or use the efforts that I and others have put into modules
like Apache::Filter, which makes it easy.


  -------------------                            -------------------
  Ken Williams                             Last Bastion of Euclidity
  ken@forum.swarthmore.edu                            The Math Forum

Re: to clarify (getting what was printed in PerlHandler)

Posted by JR Mayberry <jr...@e-vend.net>.
It's not really as plug and play as I was looking for..

I'm surprised that theres no built in functionality to allow any of the
post-handler phases to be able to retreive what was dumped out...

oh well..

----- Original Message -----
From: "Matt Sergeant" <ma...@sergeant.org>
To: "JR Mayberry" <jr...@e-vend.net>
Cc: "Ken Williams" <ke...@forum.swarthmore.edu>; <mo...@apache.org>
Sent: Tuesday, March 13, 2001 10:23 AM
Subject: Re: to clarify (getting what was printed in PerlHandler)


> On Tue, 13 Mar 2001, JR Mayberry wrote:
>
> > I actually dont want to change whats outgoing -- I just want to know
what it
> > is..
>
> And the answer remains the same. Apache::Filter.
>
> --
> <Matt/>
>
>     /||    ** Founder and CTO  **  **   http://axkit.com/     **
>    file://||    **  AxKit.com Ltd   **  ** XML Application Serving **
>   // ||    ** http://axkit.org **  ** XSLT, XPathScript, XSP  **
>  // \\| // ** mod_perl news and resources: http://take23.org  **
>      \\//
>      //\\
>     //  \\


Re: to clarify (getting what was printed in PerlHandler)

Posted by Matt Sergeant <ma...@sergeant.org>.
On Tue, 13 Mar 2001, JR Mayberry wrote:

> I actually dont want to change whats outgoing -- I just want to know what it
> is..

And the answer remains the same. Apache::Filter.

-- 
<Matt/>

    /||    ** Founder and CTO  **  **   http://axkit.com/     **
   //||    **  AxKit.com Ltd   **  ** XML Application Serving **
  // ||    ** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** mod_perl news and resources: http://take23.org  **
     \\//
     //\\
    //  \\


Re: to clarify (getting what was printed in PerlHandler)

Posted by JR Mayberry <jr...@e-vend.net>.
I actually dont want to change whats outgoing -- I just want to know what it
is..


----- Original Message -----
From: "Ken Williams" <ke...@forum.swarthmore.edu>
To: "JR Mayberry" <jr...@e-vend.net>
Cc: <mo...@apache.org>
Sent: Monday, March 12, 2001 7:20 PM
Subject: Re: to clarify (getting what was printed in PerlHandler)


> jr.mayberry@e-vend.net (JR Mayberry) wrote:
> >Is it possible to retreive what was printed in the PerlHandler phase
> >(what was called w/ $r->print()), in any of the post PerlHandler phases?
>
>
> jr.mayberry@e-vend.net (JR Mayberry) wrote:
> >a way to do it transparently...(ie: not changing code)
> >
> >i realize there are ways to do it otherwise..
>
> Which code do you not want to change?  Some code *somewhere* is going to
> have to change, or else (obviously) nothing different is going to happen.
>
> There are several ways to do this without changing any of the print
> statements, is that what you mean?
>
>
>   -------------------                            -------------------
>   Ken Williams                             Last Bastion of Euclidity
>   ken@forum.swarthmore.edu                            The Math Forum


Re: to clarify (getting what was printed in PerlHandler)

Posted by Ken Williams <ke...@forum.swarthmore.edu>.
jr.mayberry@e-vend.net (JR Mayberry) wrote:
>Is it possible to retreive what was printed in the PerlHandler phase
>(what was called w/ $r->print()), in any of the post PerlHandler phases?


jr.mayberry@e-vend.net (JR Mayberry) wrote:
>a way to do it transparently...(ie: not changing code)
>
>i realize there are ways to do it otherwise..

Which code do you not want to change?  Some code *somewhere* is going to
have to change, or else (obviously) nothing different is going to happen.

There are several ways to do this without changing any of the print
statements, is that what you mean?


  -------------------                            -------------------
  Ken Williams                             Last Bastion of Euclidity
  ken@forum.swarthmore.edu                            The Math Forum