diff options
Diffstat (limited to 'pdf-as-web/src/main/java/at/gv')
-rw-r--r-- | pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/DataURLServlet.java | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/DataURLServlet.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/DataURLServlet.java index a19b24a..a4203ff 100644 --- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/DataURLServlet.java +++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/DataURLServlet.java @@ -145,7 +145,7 @@ public class DataURLServlet extends HttpServlet { protected void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
log.debug("Data URL is accessed."); //$NON-NLS-1$
-
+
Object sessionObject = null;
try {
sessionObject = SessionHelper.getSession(request);
@@ -164,6 +164,9 @@ public class DataURLServlet extends HttpServlet { } catch (ExternalErrorException f) {
if (statLog.isInfoEnabled()) {
+
+ String ua = request.getHeader("User-Agent");
+
long endTime = System.currentTimeMillis();
// String toReport = "SIGN;" + si.mode + ";" + si.filename +
// ";"+ fileSize + ";" +
@@ -174,13 +177,13 @@ public class DataURLServlet extends HttpServlet { SignSessionInformation si = (SignSessionInformation) sessionObject;
toReport = "SIGN;" + si.mode + ";" + si.connector + ";"
+ si.pdfDataSource.getLength() + ";"
- + (endTime - si.startTime) + ";ERROR";
+ + (endTime - si.startTime) + ";ERROR;" + ua;
} else {
VerifySessionInformation si = (VerifySessionInformation) sessionObject;
try {
- toReport = "VERIFY;"+ si.file_name + ";"+ 0 + ";" + (endTime - si.startTime) + ";" + VerifyServlet.debugVerifyResults(si.verifyResults) + ";ERROR";
+ toReport = "VERIFY;"+ si.file_name + ";"+ 0 + ";" + (endTime - si.startTime) + ";" + VerifyServlet.debugVerifyResults(si.verifyResults) + ";ERROR;" + ua;
} catch (SettingNotFoundException e1) {
- toReport = "VERIFY;"+ si.file_name + ";"+ 0 + ";" + (endTime - si.startTime) + ";ERROR-debug-verify" + ";ERROR";
+ toReport = "VERIFY;"+ si.file_name + ";"+ 0 + ";" + (endTime - si.startTime) + ";ERROR-debug-verify" + ";ERROR;" + ua;
}
}
}
@@ -398,7 +401,7 @@ public class DataURLServlet extends HttpServlet { response.setCharacterEncoding("UTF-8");
response.getWriter()
.println(
- "Das detached XML kann nicht direkt durch die BKU geschliffen werden, weil diese es als Request interpretieren würde. Daher das XML als Text:");
+ "Das detached XML kann nicht direkt durch die BKU geschliffen werden, weil diese es als Request interpretieren w�rde. Daher das XML als Text:");
response.getWriter().println(
new String(si.signedPdf, "UTF-8"));
if (statLog.isInfoEnabled()) {
@@ -408,7 +411,7 @@ public class DataURLServlet extends HttpServlet { String toReport = "SIGN;" + si.mode + ";"
+ si.connector + ";"
+ si.pdfDataSource.getLength() + ";"
- + (endTime - si.startTime) + ";OK";
+ + (endTime - si.startTime) + ";OK;" + userAgent;
statLog.info(toReport);
}
@@ -427,7 +430,7 @@ public class DataURLServlet extends HttpServlet { String toReport = "SIGN;" + si.mode + ";"
+ si.connector + ";"
+ si.pdfDataSource.getLength() + ";"
- + (endTime - si.startTime) + ";OK";
+ + (endTime - si.startTime) + ";OK;" + userAgent;
statLog.info(toReport);
}
@@ -468,7 +471,7 @@ public class DataURLServlet extends HttpServlet { String toReport = "SIGN;" + si.mode + ";"
+ si.connector + ";"
+ si.pdfDataSource.getLength() + ";"
- + (endTime - si.startTime) + ";OK";
+ + (endTime - si.startTime) + ";OK;" + userAgent;
statLog.info(toReport);
}
@@ -499,6 +502,8 @@ public class DataURLServlet extends HttpServlet { SignatureException {
log.trace("processVerify");
+ String userAgent = request.getHeader("user-agent");
+
String xml_response = request.getParameter("XMLResponse"); //$NON-NLS-1$
log.debug("xml_response = " + xml_response); //$NON-NLS-1$
@@ -558,9 +563,9 @@ public class DataURLServlet extends HttpServlet { // ";"+ fileSize + ";" +
String toReport = null;
try {
- toReport = "VERIFY;"+ si.file_name + ";"+ 0 + ";" + (endTime - si.startTime) + ";" + VerifyServlet.debugVerifyResults(si.verifyResults) + ";OK";
+ toReport = "VERIFY;"+ si.file_name + ";"+ 0 + ";" + (endTime - si.startTime) + ";" + VerifyServlet.debugVerifyResults(si.verifyResults) + ";OK;" + userAgent;
} catch (SettingNotFoundException e1) {
- toReport = "VERIFY;"+ si.file_name + ";"+ 0 + ";" + (endTime - si.startTime) + ";ERROR-debug-verify" + ";OK";
+ toReport = "VERIFY;"+ si.file_name + ";"+ 0 + ";" + (endTime - si.startTime) + ";ERROR-debug-verify" + ";OK;" + userAgent;
}
statLog.info(toReport);
|