Skip to content
Snippets Groups Projects
Commit 2db8dd02 authored by Thorsten Vitt's avatar Thorsten Vitt
Browse files

Improved suggested filename.

parent b2dda441
No related branches found
No related tags found
No related merge requests found
......@@ -362,7 +362,13 @@ public ResponseBuilder createResponse() throws ObjectNotFoundFault, MetadataPars
cacheControl.setPrivate(sid.isPresent());
cacheControl.setMaxAge(86400); // one day
builder.cacheControl(cacheControl);
builder.header("Content-Disposition", "inline;filename=\"" + DefaultFilenamePolicy.INSTANCE.getFilename(getContent().getMetadata(), false) + ".html\"");
builder.header(
"Content-Disposition",
"inline;filename=\""
+ DefaultFilenamePolicy.INSTANCE.translate(getContent()
.getMetadata().getGeneric().getProvided()
.getTitle().get(0)) + "."
+ rootURI.getSchemeSpecificPart() + ".html\"");
builder.entity(this);
return builder;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment