commented User-Agent
This commit is contained in:
parent
99cfe3976a
commit
ffcc6a15e1
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue