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