[
https://issues.apache.org/jira/browse/WW-5786?focusedWorklogId=1049649&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1049649
]
ASF GitHub Bot logged work on WW-5786:
--------------------------------------
Author: ASF GitHub Bot
Created on: 23/Oct/26 11:37
Start Date: 23/Oct/26 11:37
Worklog Time Spent: 10m
Work Description: lukaszlenart merged PR #2052:
URL: https://github.com/apache/struts/pull/2052
Issue Time Tracking
-------------------
Worklog Id: (was: 1049649)
Time Spent: 0.5h (was: 20m)
> Verify HTTP method restrictions for Convention plugin actions
> -------------------------------------------------------------
>
> Key: WW-5786
> URL: https://issues.apache.org/jira/browse/WW-5786
> Project: Struts 2
> Issue Type: Task
> Components: Plugin - Convention
> Reporter: Lukasz Lenart
> Assignee: Lukasz Lenart
> Priority: Major
> Fix For: 7.5.0
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> Follow-up to WW-3717, which adds an {{http-method}} attribute to {{<action>}}
> in {{struts.xml}}, enforced by {{HttpMethodInterceptor}}, with a 405 response
> (and an {{Allow}} header) when no {{bad-request}} result is mapped.
> Actions discovered by the Convention plugin have no XML declaration, so they
> cannot use the new attribute. The expectation is that they are already
> covered by the existing annotations ({{@HttpGet}}, {{@HttpPost}},
> {{@HttpPut}}, {{@HttpDelete}}, {{@HttpGetOrPost}}, {{@AllowedHttpMethod}}) on
> the action class or method.
> Verify this and pick one outcome:
> * *Covered:* add tests in the Convention plugin that pin it: an annotated
> Convention action (class-level and method-level, including an
> {{@Action}}-mapped method) rejects a disallowed method with the mapped
> {{bad-request}} result, or with 405 + {{Allow}} when none is mapped, and
> accepts an allowed one.
> * *Gap confirmed:* document what is missing (for example, a case the
> annotations cannot express for Convention actions) and open a New Feature
> ticket at 8.0.0 for an {{@Action(httpMethod = ...)}} style attribute, linking
> it here.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)