view release on metacpan or search on metacpan
that roles can hook to feed extra parameters into the constructor
of request or response classes.
5.90016 - 2012-08-16 15:35:00
- prepare_parameters is no longer an attribute builder. It is now a method
that calls the correct underlying functionality (Bill Moseley++)
- Updated Makefile.PL to handle MacOSX tar
- Fix uri_for to handle a stringifiable object
- Fix model/view/controller methods to handle stringifiable objects
- Fix RT#78377 - IIS7 ignores response body for 3xx requests, which
causes (a different) response to be broken when using keepalive.
Fixed by applying Middleware which removes the response body and
content length that Catalyst supplies with redirects.
5.90015 - 2012-06-30 16:57:00
- Fix $c->finalize_headers getting called twice. RT#78090
- Fix test fails in Catalyst-Plugin-Session-State-Cookie. RT#76179
- Fix test fails in Catalyst-Plugin-StackTrace
- Fix test fails in Test-WWW-Mechanize-Catalyst
5.90014 - 2012-06-26 10:00:00
Bug fixes:
- mod_perl handler fixed to work with application classes which have manually
been made immutable.
- Scripts now force the Plack engine choice manually, rather than relying
on auto-detection, as the automatic mechanism gets it wrong if (for
example) Coro is loaded.
- Server script option for --fork --keepalive are now handled by loading
the Starman server, rather than silently ignored.
- Server script options for --background and --pid are now fixed by
using MooseX::Deamonize
- Plack middlewares to deal with issues in Lighttpd and IIS6 are now
automatically applied to applications and deployments which need them
(when there is not a user written .psgi script available).
This fixes compatibility with previous stable releases for applications
deployed in these environments.
5.8000_05 2008-29-01 00:00
- Text::SimpleTable's go as wide as $ENV{COLUMNS} (jhannah)
Patch written by Oleg Kostyuk <cub.uanic@gmail.com>
- Improve docs for visit (mateu)
- Add docs for finalize hook (dhoss)
- Added ru/ua translations to error page
- Improve the clarity and verbosity of the warning when component
resolution uses regex fallback. (jhannah)
- Handle leading CRLF in HTTP requests sometimes sent by IE6 in
keep-alive requests.
- Fixes for FastCGI with IIS 6.0 (janus)
- Passing request method exported by Catalyst::Test an extra
parameter used to be ignored, but started breaking if the parameter
was not a hash in 5.8000_04. Extra parameter is now ignored if
it isn't a hashref
- Fix request arguments getting corrupted if you override the
dispatcher and call an action which detaches (for
Catalyst::Plugin::Authorization::ACL)
- Fix calling use Catalyst::Test 'MyApp' 'foo' which used to work,
but stopped as the 2nd parameter can be an options hash now
- Switch an around 'new' in Catalyst::Controller to a BUILDARGS
method as it's much neater and more obvious what is going on
- Add a clearer method on request and response _context
attributes, and use if from ::Engine rather than deleting
the key from the instance hash
- Use handles on tree attribute of Catalyst::Stats to replace
trivial delegation methods
- Change the following direct hash accesses into attributes:
Catalyst::Engine: _prepared_write
Catalyst::Engine::CGI: _header_buf
Catalyst::Engine::HTTP: options, _keepalive, _write_error
Catalyst::Request: _path
Catalyst::Stats: tree
- Fix issues in Catalyst::Controller::WrapCGI
and any other components which import (or define) their
own meta method by always explicitly calling
Class::MOP::Object->meta inside Catalyst
- Add test for this
- Add test case for the bug which is causing the
Catalyst::Plugin::Authentication tests to fail
- Fix a bug in uri_for which could cause it to generate paths
- Added tmpl to the ignored extensions.
- Fixed security problem if req->path contained '..'.
5.57 2005-11-20 22:45:00
- Updated uri_for to accept undef actions
- Switched to Module::Install
- Renamed tests for easier editing
- Reformatted documentation
- Renamed -nonew to -force
- Added PAR support
- Added keep-alive support and bug fixes to HTTP engine.
(Sascha Kiefer)
- Added daemonize option to FastCGI engine. (Sam Vilain)
5.56 2005-11-16 10:33:00
- Fixed FastCGI engine to not clobber the global %ENV on each
request. (Sam Vilain)
- Updated benchmarking to work with detach
- Fixed dispatcher, so $c->req->action(undef) works again
- Updated Catalyst::Test to use HTTP::Request::AsCGI
- Added -pidfile to external FastCGI server.
lib/Catalyst/Script/Server.pm view on Meta::CPAN
my ($success, $error) = try_load_class("MooseX::Daemonize::Core");
warn("MooseX::Daemonize is needed for the --background option: $error\n"),
exit 1 if not $success;
($success, $error) = try_load_class("POSIX");
warn("$error\n"), exit 1 if not $success;
MooseX::Daemonize::Core->meta->apply($self);
POSIX::close($_) foreach (0..2);
}
}
has keepalive => (
traits => [qw(Getopt)],
cmd_aliases => 'k',
isa => 'Bool',
is => 'ro',
default => 0,
documentation => 'Support keepalive',
);
has background => (
traits => [qw(Getopt)],
cmd_aliases => 'bg',
isa => 'Bool',
is => 'ro',
default => 0,
documentation => 'Run in the background',
);
lib/Catalyst/Script/Server.pm view on Meta::CPAN
cmd_aliases => 'sym',
isa => 'Bool',
is => 'ro',
default => 0,
documentation => 'Follow symbolic links',
predicate => '_has_follow_symlinks',
);
sub _plack_engine_name {
my $self = shift;
return $self->fork || $self->keepalive ? 'Starman' : 'Standalone';
}
sub _restarter_args {
my $self = shift;
return (
argv => $self->ARGV,
start_sub => sub { $self->_run_application },
($self->_has_follow_symlinks ? (follow_symlinks => $self->follow_symlinks) : ()),
($self->_has_restart_delay ? (sleep_interval => $self->restart_delay) : ()),
($self->_has_restart_directory ? (directories => $self->restart_directory) : ()),
($self->_has_restart_regex ? (filter => $self->restart_regex) : ()),
),
(
map { $_ => $self->$_ } qw(application_name host port debug pidfile fork background keepalive)
);
}
has restarter_class => (
is => 'ro',
isa => 'Str',
lazy => 1,
default => sub {
my $self = shift;
Catalyst::Utils::env_value($self->application_name, 'RESTARTER') || 'Catalyst::Restarter';
lib/Catalyst/Script/Server.pm view on Meta::CPAN
}
}
sub _plack_loader_args {
my ($self) = shift;
return (
port => $self->port,
host => $self->host,
keepalive => $self->keepalive ? 100 : 1,
server_ready => sub {
my ($args) = @_;
my $name = $args->{server_software} || ref($args); # $args is $server
my $host = $args->{host} || 0;
my $proto = $args->{proto} || 'http';
print STDERR "$name: Accepting connections at $proto://$host:$args->{port}/\n";
},
);
lib/Catalyst/Script/Server.pm view on Meta::CPAN
around _application_args => sub {
my ($orig, $self) = @_;
return (
$self->port,
$self->host,
{
%{ $self->$orig },
map { $_ => $self->$_ } qw/
fork
keepalive
background
pidfile
keepalive
follow_symlinks
port
host
/,
},
);
};
__PACKAGE__->meta->make_immutable;
1;
lib/Catalyst/Script/Server.pm view on Meta::CPAN
myapp_server.pl [options]
Options:
-d --debug force debug mode
-f --fork handle each request in a new process
(defaults to false)
--help display this help and exits
-h --host host (defaults to all)
-p --port port (defaults to 3000)
-k --keepalive enable keep-alive connections
-r --restart restart when files get modified
(defaults to false)
--rd --restart_delay delay between file checks
(ignored if you have Linux::Inotify2 installed)
--rr --restart_regex regex match files that trigger
a restart when modified
(defaults to '\.yml$|\.yaml$|\.conf|\.pm$')
--rdir --restart_directory the directory to search for
modified files, can be set multiple times
(defaults to '[SCRIPT_DIR]/..')
lib/Catalyst/Test.pm view on Meta::CPAN
}
my $agent;
sub _remote_request {
require LWP::UserAgent;
local $Plack::Test::Impl = 'ExternalServer';
unless ($agent) {
$agent = LWP::UserAgent->new(
keep_alive => 1,
max_redirect => 0,
timeout => 60,
# work around newer LWP max_redirect 0 bug
# http://rt.cpan.org/Ticket/Display.html?id=40260
requests_redirectable => [],
);
$agent->env_proxy;
}
t/aggregate/unit_core_engine_fixenv-iis6.t view on Meta::CPAN
'CONTENT_TYPE' => '',
'LOCAL_ADDR' => '127.0.0.1',
'GATEWAY_INTERFACE' => 'CGI/1.1',
'HTTPS' => 'off',
'DOCUMENT_ROOT' => 'C:\\Foo\\script',
'REMOTE_HOST' => '127.0.0.1',
'PATH_TRANSLATED' => 'C:\\Foo\\script\\blurb',
'APPL_PHYSICAL_PATH' => 'C:\\Foo\\script\\',
'SERVER_NAME' => '127.0.0.1',
'HTTP_ACCEPT_ENCODING' => 'gzip,deflate',
'HTTP_CONNECTION' => 'keep-alive',
'INSTANCE_ID' => '793536',
'CONTENT_LENGTH' => '0',
'AUTH_USER' => '',
'APPL_MD_PATH' => '/LM/W3SVC/793536/Root/koo',
'HTTP_ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'REMOTE_USER' => '',
'SERVER_PORT_SECURE' => '0',
'SERVER_PORT' => 83,
'REMOTE_ADDR' => '127.0.0.1',
'SERVER_PROTOCOL' => 'HTTP/1.1',
t/aggregate/unit_core_engine_fixenv-lighttpd.t view on Meta::CPAN
use warnings;
use Test::More;
use Catalyst ();
my %env = (
'SCRIPT_NAME' => '/bar',
'SERVER_NAME' => 'localhost:8000',
'HTTP_ACCEPT_ENCODING' => 'gzip,deflate',
'HTTP_CONNECTION' => 'keep-alive',
'PATH_INFO' => '',
'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'REQUEST_METHOD' => 'GET',
'SCRIPT_FILENAME' => '/tmp/Foo/root/bar',
'HTTP_ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'SERVER_SOFTWARE' => 'lighttpd/1.4.15',
'QUERY_STRING' => '',
'REMOTE_PORT' => '22207',
'SERVER_PORT' => 8000,
'REDIRECT_STATUS' => '200',
t/aggregate/unit_core_script_server.t view on Meta::CPAN
testOption( [ qw/-f/ ], ['3000', undef, opthash(fork => 1)] );
}
if (try { require MooseX::Daemonize; 1; }) {
# pidfile -pidfile --pid --pidfile
testOption( [ qw/--pidfile cat.pid/ ], ['3000', undef, opthash(pidfile => "cat.pid")] );
testOption( [ qw/--pid cat.pid/ ], ['3000', undef, opthash(pidfile => "cat.pid")] );
}
if (try { require Plack::Handler::Starman; 1; }) {
# keepalive -k -keepalive --keepalive -k --keepalive
testOption( [ qw/-k/ ], ['3000', undef, opthash(keepalive => 1)] );
testOption( [ qw/--keepalive/ ], ['3000', undef, opthash(keepalive => 1)] );
}
# symlinks -follow_symlinks --sym --follow_symlinks
#
testOption( [ qw/--sym/ ], ['3000', undef, opthash(follow_symlinks => 1)] );
testOption( [ qw/--follow_symlinks/ ], ['3000', undef, opthash(follow_symlinks => 1)] );
if (try { require MooseX::Daemonize; 1; }) {
# background -background --bg --background
testBackgroundOptionWithFork( [ qw/--background/ ]);
t/aggregate/unit_core_script_server.t view on Meta::CPAN
return $i;
}
# Returns the hash expected when no flags are passed
sub opthash {
return {
'pidfile' => undef,
'fork' => 0,
'follow_symlinks' => 0,
'background' => 0,
'keepalive' => 0,
port => 3000,
host => undef,
@_,
};
}
sub restartopthash {
my $opthash = opthash(@_);
my $val = {
application_name => 'TestAppToTestScripts',