WebDavNamespaceContext nsContext = new WebDavNamespaceContext(session);
URI uri = new URI(TextUtil.escape(baseURI + node.getPath(), '%', true));
if (ResourceUtil.isFile(node))
{
Resource resource = new FileResource(uri, node, nsContext);
String lastModified = resource.getProperty(PropertyConstants.GETLASTMODIFIED).getValue();
String contentType = resource.getProperty(PropertyConstants.GETCONTENTTYPE).getValue();
String contentLength = resource.getProperty(PropertyConstants.GETCONTENTLENGTH).getValue();
return Response.ok().header(ExtHttpHeaders.LAST_MODIFIED, lastModified).header(ExtHttpHeaders.CONTENT_TYPE,
contentType).header(ExtHttpHeaders.CONTENT_LENGTH, contentLength).build();
}