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