mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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:
@@ -138,8 +138,7 @@ public abstract class WebScriptRuntime
|
||||
String reqFormat = scriptReq.getFormat();
|
||||
String format = (reqFormat == null || reqFormat.length() == 0) ? "default" : scriptReq.getFormat();
|
||||
WebScriptDescription desc = scriptReq.getServiceMatch().getWebScript().getDescription();
|
||||
logger.debug("Format style: " + desc.getFormatStyle());
|
||||
logger.debug("Default format: " + desc.getDefaultFormat());
|
||||
logger.debug("Format style: " + desc.getFormatStyle() + ", Default format: " + desc.getDefaultFormat());
|
||||
logger.debug("Invoking Web Script " + description.getId() + (user == null ? " (unauthenticated)" : " (authenticated as " + user + ") (format " + format + ") (" + locale + ")"));
|
||||
}
|
||||
|
||||
@@ -224,12 +223,13 @@ public abstract class WebScriptRuntime
|
||||
// render output
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Force success status header in response: " + req.forceSuccessStatus());
|
||||
logger.debug("Sending status " + statusCode + " (Template: " + templatePath + ")");
|
||||
logger.debug("Rendering response: content type=" + MimetypeMap.MIMETYPE_HTML);
|
||||
}
|
||||
|
||||
res.reset();
|
||||
res.setStatus(statusCode);
|
||||
res.setStatus(req.forceSuccessStatus() ? HttpServletResponse.SC_OK : statusCode);
|
||||
res.setContentType(MimetypeMap.MIMETYPE_HTML + ";charset=UTF-8");
|
||||
try
|
||||
{
|
||||
|
Reference in New Issue
Block a user