Web Scripts:

- optionally force status in response header to success regardless of actual status; status in reponse document still reflects actual status
- to support the limitations of Flex runtime without Flex data services
- set alf-force-success-response to true in request header

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5873 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
David Caruana
2007-06-06 22:13:47 +00:00
parent 78342496ab
commit 955db41f51
8 changed files with 93 additions and 18 deletions

View File

@@ -129,8 +129,10 @@ public class DeclarativeWebScript extends AbstractWebScript
{
// render output
int statusCode = status.getCode();
if (statusCode != HttpServletResponse.SC_OK)
if (statusCode != HttpServletResponse.SC_OK && !req.forceSuccessStatus())
{
logger.debug("Force success status header in response: " + req.forceSuccessStatus());
logger.debug("Setting status " + statusCode);
res.setStatus(statusCode);
}