You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2015/10/12 13:24:10 UTC
[jira] [Commented] (WW-4545) Setting status code in HttpHeaders
will be ignored
[ https://issues.apache.org/jira/browse/WW-4545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14952946#comment-14952946 ]
Hudson commented on WW-4545:
----------------------------
SUCCESS: Integrated in Struts-JDK7-master #371 (See [https://builds.apache.org/job/Struts-JDK7-master/371/])
WW-4545 - Setting status code in HttpHeaders will be ignored (jogep: rev 4cd9a74cb8efa8dc0d3c57ac267a70b0538f3bf0)
* plugins/rest/src/main/java/org/apache/struts2/rest/DefaultContentTypeHandlerManager.java
> 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
> Fix For: 2.5
>
> 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)