Skip Menu |

This queue is for tickets about the Catalyst-ActionRole-MatchRequestAccepts CPAN distribution.

Report information
The Basics
Id: 107786
Status: new
Priority: 0/
Queue: Catalyst-ActionRole-MatchRequestAccepts

People
Owner: Nobody in particular
Requestors: tsibley [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.05
Fixed in: (no value)



The documentation says: Please note that if you specify multiple Accept attributes on a single action, those will be matched via an OR condition and not an AND condition. In other words we short circuit match the first action with at least one of the Accept values appearing in the requested HTTP headers. I think this is correct since I imagine the purpose of multiple Accept attributes would be to match several acceptable variations of a given type, not to match any of several unrelated types. However, the code functions in the opposite way: if(all(@attr_accepts) eq any(@hdr_accepts)) { Which requires that all of the action's Accept values match something in the HTTP Accept: values. I believe the docs are the desired behaviour, which would mean the code should be changed to: if(any(@attr_accepts) eq any(@hdr_accepts)) { Do you concur?