Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4545

Setting status code in HttpHeaders will be ignored

    XMLWordPrintableJSON

Details

    Description

      Setting the status code for validation has no effect.

      <constant name="struts.rest.validationFailureStatusCode" value="406"/>
      

      Inside of the RestWorkflowInterceptor this status code is used:

                  	HttpHeaders info = new DefaultHttpHeaders()
                  	    .disableCaching()
                  	    .renderResult(method)
                  	    .withStatus(validationFailureStatusCode);
      

      But the result has still a 200 success result.

      Attachments

        1. WW-4545.patch
          1 kB
          Johannes Geppert

        Activity

          People

            Unassigned Unassigned
            jogep Johannes Geppert
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: