[ 
https://issues.apache.org/struts/browse/STR-2119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_41350
 ] 

Eric Jain commented on STR-2119:
--------------------------------

404 is a very specific error and may not be appropriate in all (or most) cases 
where validation fails! 400 on the other hand can be seen as a generic 
"something was wrong with your request" response. If I could tell Struts what 
codes to return in what cases that would of course be great. But otherwise a 
generic error code that implies a mistake on the client side seems better than 
the 200 "all is fine" response I get now, for the reasons given above.


> Return appropriate status code when form validation fails
> ---------------------------------------------------------
>
>                 Key: STR-2119
>                 URL: https://issues.apache.org/struts/browse/STR-2119
>             Project: Struts 1
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.1 Final
>         Environment: Operating System: other
> Platform: Other
>            Reporter: Eric Jain
>            Assignee: Paul Benedict
>            Priority: Minor
>             Fix For: 1.4.0
>
>
> When redisplaying a form after validation has indicated a failure, a status 
> code
> such as "400 Bad Request" should be used in place of "200 OK". This simplifies
> testing, and is important for applications that need to interact with the web
> interface of an application directly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to