struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johannes Geppert (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (WW-4545) Setting status code in HttpHeaders will be ignored
Date Thu, 10 Sep 2015 15:09:46 GMT

     [ https://issues.apache.org/jira/browse/WW-4545?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Johannes Geppert updated WW-4545:
---------------------------------
    Attachment: WW-4545.patch

This patch solves the Issue for me.

> Setting status code in HttpHeaders will be ignored
> --------------------------------------------------
>
>                 Key: WW-4545
>                 URL: https://issues.apache.org/jira/browse/WW-4545
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - REST
>    Affects Versions: 2.5
>            Reporter: Johannes Geppert
>              Labels: rest, struts2
>         Attachments: WW-4545.patch
>
>
> Setting the status code for validation has no effect.
> {code:xml}
> <constant name="struts.rest.validationFailureStatusCode" value="406"/>
> {code}
> Inside of the RestWorkflowInterceptor this status code is used:
> {code:java}
>             	HttpHeaders info = new DefaultHttpHeaders()
>             	    .disableCaching()
>             	    .renderResult(method)
>             	    .withStatus(validationFailureStatusCode);
> {code}
> But the result has still a 200 success result.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message