diff options
author | tkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7> | 2013-04-10 19:33:50 +0000 |
---|---|---|
committer | tkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7> | 2013-04-10 19:33:50 +0000 |
commit | 0a6428b4339ee52dbfc38040217fcc87742d9f88 (patch) | |
tree | b65f70625235239d8272496c82ffbabf655b2682 /pdf-over-gui/src/main/java/at/asit | |
parent | 2717f5698bdbbbe7889ebea533cf2d187c8ccd44 (diff) | |
download | mocca-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.java | 14 |
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; |