Apache2-Controller
view release on metacpan or search on metacpan
Session now saves only if status < 300, or if
notes->{a2c_session_force_save} is set.
OpenID! Rockin. It doesn't preserve post or get vars
yet from the prior request across the openid redirect cycle,
but it's good enough to release. Hurrah!
Instead of using PerlCleanupHandler to save session and
commit database, it uses PerlLogHandler while the
connection is still open. Otherwise, session untying
and database commits may not be processed synchronously
before the next request that depends on those changes.
0.110.000 2008-08-06
Removing the "RUN_ALL" simulated mode from response handler.
It's an over-optimization, and A2C:DBI::Connector supports
a PerlCleanupHandler to rollback uncommitted transactions.
Now Controller.pm does not return DONE, but sets status
and returns OK.
lib/Apache2/Controller.pm view on Meta::CPAN
Keep in mind that if you use other request phase processors that
push a C<PerlLogHandler> like
L<Apache2::Controller::DBI::Connector> or
L<Apache2::Controller::Session>, those will still run,
but for example the session controller won't save the session
if you set or return an http status higher than the HTTP_OK family
(HTTP_MULTIPLE_CHOICES (300) or higher.)
You should also not fiddle with the connection by causing
Apache2 to close it prematurely, else the post-response handlers
may not run or won't run synchronously before another request
is received that may have depended on their behavior.
(For example, you can't use a C<< PerlCleanupHandler >>
to do things like that because the request has already closed,
and it doesn't get processed before taking in the next request,
even when running in single-process mode.)
=head1 ERRORS
If you decide to set an error status code, you can print your
own content and return that status code.
lib/Apache2/Controller/Directives.pm view on Meta::CPAN
Default is 1 hour. A month is actually 30 days, a year 365.
If you use 'no timeout' then logins will never expire.
This probably is not a good idea because OpenID url's can
be revoked, and because the login process can be a transparent
series of redirects if the user has something like
Verisign's SeatBelt plugin.
If you're doing some sort of cluster application or load balancing
and sharing the session between servers, make sure all your servers
are synchronized with NTP.
=cut
my %time_multiplier = (
s => 1,
m => 60,
h => 60 * 60,
D => 60 * 60 * 24,
M => 60 * 60 * 24 * 30,
Y => 60 * 60 * 24 * 365,
lib/Apache2/Controller/Log/DetectAbortedConnection.pm view on Meta::CPAN
You don't need to use this handler, probably.
This is pushed internally by L<Apache2::Controller::Session>
to detect in the PerlLogHandler phase if the connection has
been broken to the client before the server closes the connection.
So far it's only useful for the session, and because we now
use a C<PerlLogHandler> for session saving instead of the
C<PerlCleanupHandler> in prior versions. Using a
C<PerlCleanupHandler> caused
problems with synchronicity since the test scripts would
fire off a new request before Apache was done processing
the session saving from the prior request... I don't know
why it did this under prefork with C<Apache::Test>,
but it did.
So, I'm leaving it separate just in case it is useful for
something else in the future.
=head1 FUNCTIONS
( run in 0.258 second using v1.01-cache-2.11-cpan-0d8aa00de5b )