Skip Menu |

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

Report information
The Basics
Id: 97297
Status: resolved
Priority: 0/
Queue: Catalyst-Runtime

People
Owner: Nobody in particular
Requestors: shane [...] eznettools.com
Cc:
AdminCc:

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



Subject: PATCH action subroutine attribute not supported (patch included)
Date: Wed, 16 Jul 2014 15:43:43 -0600
To: bug-Catalyst-Runtime [...] rt.cpan.org
From: "Shane Corgatelli" <shane [...] eznettools.com>
The PATCH action attribute is documented in Catalyst::Controller. However, it doesn't actually work. It acts like an action without a HTTP method specified. For example, if I have the following actions defined: sub start :ChainedParent :PathPart('test') :CaptureArgs(0) {} sub update :PUT :Chained('start') :PathPart('') :Args(1) { my ( $self, $ctx, $id ) = @_; $ctx->response->body("Matched PUT $id"); } sub patch :PATCH :Chained('start') :PathPart('') :Args(1) { my ( $self, $ctx, $id ) = @_; $ctx->response->body("Matched PATCH $id"); } results in the following: Show quoted text
> curl -X PUT /test/1
Matched PATCH 1 Show quoted text
> curl -X PATCH /test/1
Matched PATCH 1 Show quoted text
> curl -X OPTIONS /test/1
Matched PATCH 1 It is easy to work around, just use :Method('PATCH') instead. However, I've included a patch to add support to match the documentation. Affects: Catalyst 5.90065 Thank you, Shane Corgatelli Programming Manager EZ-NetTools www.eznettools.net EZ-NetTools - We make it easy!

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #97297] AutoReply: PATCH action subroutine attribute not supported (patch included)
Date: Wed, 16 Jul 2014 18:14:27 -0600
To: bug-Catalyst-Runtime [...] rt.cpan.org
From: "Shane Corgatelli" <shane [...] eznettools.com>
I've added an updated patch that also corrects the OPTION action attribute so that it sets the method to 'OPTIONS' (See http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html). It also adds the OPTIONS action attribute. Thank you, Shane Corgatelli Programming Manager EZ-NetTools www.eznettools.net EZ-NetTools - We make it easy!

Message body is not shown because sender requested not to inline it.

Sorry for the slow response. PATCH will make it into the upcoming Catalyst release. -jnap On Wed Jul 16 20:14:37 2014, scorgatelli wrote: Show quoted text
> I've added an updated patch that also corrects the OPTION action attribute > so that it sets the method to 'OPTIONS' (See > http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html). It also adds the > OPTIONS action attribute. > > Thank you, > > Shane Corgatelli > > Programming Manager > EZ-NetTools > www.eznettools.net > > EZ-NetTools - We make it easy!