[Catalyst] Response traits.
Bill Moseley
moseley at hank.org
Wed Oct 30 23:35:47 GMT 2013
What is the recommended way to apply a Response trait? Include it in a
response subclass similar to how Catalyst::Action::REST injects
Catalyst::Request::REST?
http://cpansearch.perl.org/src/JJNAPIORK/Catalyst-Action-REST-1.12/lib/Cata=
lyst/Action/SerializeBase.pm
What I was interested in is wrapping redirect and filtering out any
white-space to prevent response splitting.
sub redirect {
my $self =3D shift;
if (@_) {
my $location =3D shift;
my $status =3D shift || 302;
$self->location($location);
$self->status($status);
}
return $self->location;
}
-- =
Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20131030/da369=
fbc/attachment.htm
More information about the Catalyst
mailing list