commented User-Agent

This commit is contained in:
Francesco Mangiacrapa 2024-04-19 11:38:05 +02:00
parent 99cfe3976a
commit ffcc6a15e1
1 changed files with 7 additions and 7 deletions

View File

@ -121,12 +121,12 @@ public class GeoportalExporter {
if (checked) {
String pdfURL = null;
if (userAgentName != null) {
LOG.info("Serving request as User-Agent {}", userAgentName);
String entity = entityHTMLMessage("Exporting as PDF...", "The project with " + projectID, true);
return Response.ok(entity).encoding("UTF-8").header(ConstantsResolver.CONTENT_TYPE, "text/html")
.build();
} else {
// if (userAgentName != null) {
// LOG.info("Serving request as User-Agent {}", userAgentName);
// String entity = entityHTMLMessage("Exporting as PDF...", "The project with " + projectID, true);
// return Response.ok(entity).encoding("UTF-8").header(ConstantsResolver.CONTENT_TYPE, "text/html")
// .build();
// } else {
LOG.info("Serving request as client...");
FileReference pdfRef = exportAsPDF(req, ucdID, projectID, null, context, user);
@ -138,7 +138,7 @@ public class GeoportalExporter {
"inline; filename=\"" + pdfRef.getFileName() + "\"")
.header("Content-Type", pdfRef.getContentType());
return response.build();
}
// }
} else {
return Response.status(Status.NOT_FOUND)
.entity(GeoportalExporter.class.getSimpleName() + " Config not found in the context " + context)