提交 769c9483 编写于 作者: N nilspreusker

fixed visualization of transformation exceptions, debug info should now be...

fixed visualization of transformation exceptions, debug info should now be rendered as HTMl instead of being offered as download
上级 d77df237
......@@ -85,15 +85,17 @@ public class ContentGet extends ActivitiStreamingWebScript {
}
}
InputStream content;
try {
content = this.cycleService.getContent(artifact.getConnectorId(), artifact.getNodeId(), contentRepresentation.getId()).asInputStream();
streamResponse(res, this.cycleService.getContent(artifact.getConnectorId(), artifact.getNodeId(), contentRepresentation.getId()).asInputStream(), new Date(0),
// TODO: what is a good way to determine the etag? Using a fake one...
"W/\"647-1281077702000\"", attach, attachmentFileName, contentType);
} catch (TransformationException e) {
content = new ByteArrayInputStream(e.getRenderContent().getBytes());
streamResponse(res, new ByteArrayInputStream(e.getRenderContent().getBytes()), new Date(0),
// TODO: what is a good way to determine the etag? Using a fake one...
"W/\"647-1281077702000\"", false, null, CycleDefaultMimeType.HTML.getContentType());
}
streamResponse(res, content, new Date(0),
// TODO: what is a good way to determine the etag? Using a fake one...
"W/\"647-1281077702000\"", attach, attachmentFileName, contentType);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册