You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Sean Scanlon <se...@gmail.com> on 2004/10/01 19:18:19 UTC

PerlCleanupHandler and redirect

I am having a problem with using a cleanup handler where it seems that
the CleanupHandler is blocking the client browser from a redirect

>From what i understand the cleanup handler happens after the
connection is closed.

I am using the cleanup handler to do some lengthy processing while the
user is redirected to a wait page.

i am registering the handler like so:
$r->register_cleanup('MyPackage::LongProcess');

if i have the handler return right away instead of doing any processing,
the client is redirected right away otherwise it blocks until the
handler returns
which happens after the client times out.

has anyone else experienced this kind of behavior?

any info or pointers is greatly appreciated!
Thanks,
-- 
-------------------------
Sean P. Scanlon
perl -le 'print pack("h*", "375616e6e2373616e6c6f6e6e236f6d6")'
-------------------------

-- 
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


Re: PerlCleanupHandler and redirect

Posted by Geoffrey Young <ge...@modperlcookbook.org>.
>> i am registering the handler like so:
>> $r->register_cleanup('MyPackage::LongProcess');
> 
> 
> what's MyPackage::LongProcess, a package name or a subroutine? It should
> be a subroutine.

actually, while it looks like 2.0 supports a few different forms, I think it
can only be a reference to a subroutine in 1.3

  $r->register_cleanup(\&My::Package::LongProcess::handler);

or somesuch.  at least I've never seen it used any other way in with 1.3.

but, as stas said, without a proper bug report giving the mod_perl version
and other details, there's just no way to know.

one thing that may be worth looking at is the way you are doing your
redirect - perhaps there is a difference in behavior if you are using
$r->internal_redirect() versus returning REDIRECT.

HTH

--Geoff



-- 
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


Re: PerlCleanupHandler and redirect

Posted by Stas Bekman <st...@stason.org>.
Sean, to start with always read http://perl.apache.org/bugs/ before 
sending a bug/problem report. I can't tell from your report what modperl 
generation/version you are using.

Sean Scanlon wrote:
> I am having a problem with using a cleanup handler where it seems that
> the CleanupHandler is blocking the client browser from a redirect
> 
>>>From what i understand the cleanup handler happens after the
> connection is closed.
> 
> I am using the cleanup handler to do some lengthy processing while the
> user is redirected to a wait page.
> 
> i am registering the handler like so:
> $r->register_cleanup('MyPackage::LongProcess');

what's MyPackage::LongProcess, a package name or a subroutine? It should 
be a subroutine.


-- 
__________________________________________________________________
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