summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java/at/asit
diff options
context:
space:
mode:
authortkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:33:50 +0000
committertkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:33:50 +0000
commit0a6428b4339ee52dbfc38040217fcc87742d9f88 (patch)
treeb65f70625235239d8272496c82ffbabf655b2682 /pdf-over-gui/src/main/java/at/asit
parent2717f5698bdbbbe7889ebea533cf2d187c8ccd44 (diff)
downloadmocca-0a6428b4339ee52dbfc38040217fcc87742d9f88.tar.gz
mocca-0a6428b4339ee52dbfc38040217fcc87742d9f88.tar.bz2
mocca-0a6428b4339ee52dbfc38040217fcc87742d9f88.zip
Request debug code
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@383 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/MobileBKUHandler.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/MobileBKUHandler.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/MobileBKUHandler.java
index e65f2fb9..c868a223 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/MobileBKUHandler.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/MobileBKUHandler.java
@@ -15,6 +15,7 @@
*/
package at.asit.pdfover.gui.workflow.states.mobilebku;
+import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
@@ -212,6 +213,19 @@ public abstract class MobileBKUHandler {
* @throws IOException IO error
*/
protected String executePost(HttpClient client, PostMethod post) throws IOException {
+ if (log.isDebugEnabled()) {
+ String req;
+ if (post.getRequestEntity().getContentLength() < 1024) {
+ ByteArrayOutputStream os = new ByteArrayOutputStream();
+ post.getRequestEntity().writeRequest(os);
+ req = os.toString();
+ os.close();
+ } else {
+ req = post.getRequestEntity().getContentLength() + " bytes"; //$NON-NLS-1$
+ }
+ log.debug("Posting to " + post.getURI() + ": " + req); //$NON-NLS-1$ //$NON-NLS-2$
+ //TODO: Remove me (sensitive data)
+ }
int returnCode = client.executeMethod(post);
String redirectLocation = null;