routeContext.getResponse().ok().resource(resourceUrl.openStream());
</BUG>
} else {
log.debug("Streaming as file '{}'", resourceUrl);
<BUG>routeContext.getResponse().ok().file(filename, resourceUrl.openStream());
</BUG>
}
}
private void sendDirectoryListing(RouteContext routeContext, File dir) {
String absoluteDirUri = getUrlPath() + StringUtils.addStart(directory.toPath().relativize(dir.toPath()).toString(), "/");

protected void sendResource(URL resourceUrl, RouteContext routeContext) throws IOException {
String filename = resourceUrl.getFile();
String mimeType = routeContext.getApplication().getMimeTypes().getContentType(filename);
if (!StringUtils.isNullOrEmpty(mimeType)) {
log.debug("Streaming as resource '{}'", resourceUrl);
routeContext.getResponse().ok().chunked(chunked).resource(resourceUrl.openStream());
} else {
log.debug("Streaming as file '{}'", resourceUrl);
routeContext.getResponse().ok().chunked(chunked).file(filename, resourceUrl.openStream());
}
}
private void sendDirectoryListing(RouteContext routeContext, File dir) {
String absoluteDirUri = getUrlPath() + StringUtils.addStart(directory.toPath().relativize(dir.toPath()).toString(), "/");
