diff options
author | afitzek <afitzek@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2012-07-09 14:24:21 +0000 |
---|---|---|
committer | afitzek <afitzek@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2012-07-09 14:24:21 +0000 |
commit | 168477fe312474c95e326383f8c101247a6f206f (patch) | |
tree | 92111c8191141bf1e5fba87501cf4ed402f488bf /pdf-as-web/src/main/java/at/gv | |
parent | 28c303923ec7bb96b18c54d660630bfab86f3b8c (diff) | |
download | pdf-as-3-168477fe312474c95e326383f8c101247a6f206f.tar.gz pdf-as-3-168477fe312474c95e326383f8c101247a6f206f.tar.bz2 pdf-as-3-168477fe312474c95e326383f8c101247a6f206f.zip |
Supported EID
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@920 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
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);
|