- Make default body reponses for 302s W3C compliant. RT#71237
+ - Fix issue where groups of attributes to override controller actions
+ in config would be (incorrectly) overwritten, if the parser for that
+ attribute mangled the contents of the attribute. This was found
+ with Catalyst::Controller::ActionRole, where Does => [ '+Foo' ]
+ would be transformed to Does => [ 'Foo' ] and written back to config,
+ whereas Does => '+Foo' would not be changed in config. RT#65463
+
Enhancements:
- Set a matching Content-type for the redirect if Catalyst sets the
%raw_attributes = (
%raw_attributes,
- exists $actions_config->{$name} ? %{ $actions_config->{$name } } : (),
+ # Note we deep copy array refs here to stop crapping on config
+ # when attributes are parsed. RT#65463
+ exists $actions_config->{$name} ? map { ref($_) eq 'ARRAY' ? [ @$_ ] : $_ } %{ $actions_config->{$name } } : (),
);
# Private actions with additional attributes will raise a warning and then
--- /dev/null
+use strict;
+use warnings;
+use Test::More;
+
+use TestApp;
+
+is(TestApp->controller("Action::ConfigSmashArrayRefs")->config->{action}{foo}{CustomAttr}[0], 'Bar', 'Config un-mangled. RT#65463');
+
+done_testing;
+
--- /dev/null
+package TestApp::Controller::Action::ConfigSmashArrayRefs;
+
+use strict;
+use base 'Catalyst::Controller';
+
+ sub foo : Action {}
+
+# check configuration for an inherited action
+__PACKAGE__->config(
+ action => {
+ foo => { CustomAttr => [ 'Bar' ] }
+ }
+);
+
+sub _parse_CustomAttr_attr {
+ my ($self, $app, $name, $value) = @_;
+ warn $value;
+ return CustomAttr => "PoopInYourShoes";
+}
+
+
+1;
+