diff --git a/lib/WebGUI.pm b/lib/WebGUI.pm index f8b6eef09..21531008e 100644 --- a/lib/WebGUI.pm +++ b/lib/WebGUI.pm @@ -124,6 +124,11 @@ sub dispatch { # Instantiate the session object my $session = $self->session( WebGUI::Session->open($self->root, $config, $request, $sessionId) ); + # Short-circuit contentHandlers - for benchmarking PSGI scaffolding vs. modperl + $session->close; + $session->output->print('WebGUI PSGI with contentHandlers short-circuited for benchmarking'); + return $session->response->finalize; + for my $handler (@{$config->get("contentHandlers")}) { my $output = eval { WebGUI::Pluggable::run($handler, "handler", [ $session ] )}; if ( my $e = WebGUI::Error->caught ) {