[Rt-commit] r12811 - in rt/branches/3.8-TESTING: lib/RT/Interface/Web/Standalone
sartak at bestpractical.com
sartak at bestpractical.com
Mon Jun 2 16:52:53 EDT 2008
Author: sartak
Date: Mon Jun 2 16:52:52 2008
New Revision: 12811
Modified:
rt/branches/3.8-TESTING/ (props changed)
rt/branches/3.8-TESTING/lib/RT/Interface/Web/Standalone/PreFork.pm
Log:
r61425 at onn: sartak | 2008-06-02 16:47:12 -0400
The random POST failings were because %ENV was not being cleared between requests
Modified: rt/branches/3.8-TESTING/lib/RT/Interface/Web/Standalone/PreFork.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/Interface/Web/Standalone/PreFork.pm (original)
+++ rt/branches/3.8-TESTING/lib/RT/Interface/Web/Standalone/PreFork.pm Mon Jun 2 16:52:52 2008
@@ -60,6 +60,13 @@
max_requests => 'StandaloneMaxRequests',
);
+=head2 default_values
+
+Produces the default values for L<Net::Server> configuration from RT's config
+files.
+
+=cut
+
sub default_values {
my %forking = (
map { $_ => RT->Config->Get( $option_map{$_} ) }
@@ -74,6 +81,13 @@
};
}
+=head2 post_bind_hook
+
+After binding to the specified ports, let the user know that the server is
+prepared to handle connections.
+
+=cut
+
sub post_bind_hook {
my $self = shift;
my @ports = @{ $self->{server}->{port} };
@@ -86,4 +100,12 @@
$self->SUPER::post_bind_hook(@_);
}
+# Clear the environment before handling the next request. Only called if
+# a Net::Server is being used. Otherwise, HTTP::Server::Simple does it for us.
+sub post_accept {
+ my $self = shift;
+ RT::Interface::Web::Standalone->setup_environment;
+ $self->SUPER::post_accept(@_);
+}
+
1;
More information about the Rt-commit
mailing list