------=_Part_11905_21507849.1162507458265
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi, I'm registering a PerlCleanupHandler method in my mod_perl cgi handler.

Using:
$r->set_handlers( PerlCleanupHandler => [ &send_to_client ]);

My goal is to have this service take an xml message, do some processing on
it and reply with a confirm xml message. Afterward I need to POST a
completely new message to the client unrelated to that connection but
initiated because of it. I don't want to have to write an external program
(run via cron) to push these messages. Nor do I have any queue software
installed. I simply want to register the Cleanup method to do the work
after the response has been sent back to the client and the connection is
closed. In testing this out, it works pefectly when testing with curl using
a simple GET. It sends me a response almost immediately, but if i watch the
logs, it processes the cleanuphandler method like it should, after i already
received the response (testing this using a sleep 5; in the top of sub
send_to_client). However, as soon as I change my request to a POST, it is
blocking. The request hangs and doesn't send the response to the client
until after the Cleanup method has completed. Is this proper behaviour? Is
there a way around this?

Thanks.

--
Steve Johnson
steve@webninja.com

------=_Part_11905_21507849.1162507458265
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi, I'm registering a PerlCleanupHandler method in my mod_perl cgi handler.=
 
Using:
$r->set_handlers( PerlCleanupHandler =3D> [ &amp=
;send_to_client ]);

My goal is to have this service take an xml mes=
sage, do some processing on it and reply with a confirm xml message.  =
Afterward I need to POST a completely new message to the client unrelated t=
o that connection but initiated because of it.  I don't want to have t=
o write an external program (run via cron) to push these messages.  No=
r do I have any queue software installed.  I simply want to register t=
he Cleanup method to do the work after the response has been sent back to t=
he client and the connection is closed.  In testing this out, it works=
pefectly when testing with curl using a simple GET.  It sends me a re=
sponse almost immediately, but if i watch the logs, it processes the cleanu=
phandler method like it should, after i already received the response (test=
ing this using a sleep 5; in the top of sub send_to_client).  However,=
as soon as I change my request to a POST, it is blocking.  The reques=
t hangs and doesn't send the response to the client until after the Cleanup=
method has completed.  Is this proper behaviour?  Is there a way=
around this?


Thanks.

--
Steve Johnson
inja.com">steve@webninja.com

------=_Part_11905_21507849.1162507458265--