diff options
author | wbauer <wbauer@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2008-09-19 12:17:47 +0000 |
---|---|---|
committer | wbauer <wbauer@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2008-09-19 12:17:47 +0000 |
commit | 9ca314eced8a73f58282684597468f98621ac502 (patch) | |
tree | 296c6617b5ebc2d0002098bdeece45e21c816ba0 /bkucommon/src/main/java/at/gv/egiz/bku/binding | |
parent | 40e57f6c9101ddcc00422d95086d6a485c3ceda2 (diff) | |
download | mocca-9ca314eced8a73f58282684597468f98621ac502.tar.gz mocca-9ca314eced8a73f58282684597468f98621ac502.tar.bz2 mocca-9ca314eced8a73f58282684597468f98621ac502.zip |
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@53 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'bkucommon/src/main/java/at/gv/egiz/bku/binding')
-rw-r--r-- | bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrl.java | 3 | ||||
-rw-r--r-- | bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnectionImpl.java | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrl.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrl.java index a8477ece..d462ac60 100644 --- a/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrl.java +++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrl.java @@ -52,7 +52,8 @@ public class DataUrl { }
public DataUrlConnection openConnection() {
- try {
+ try { + log.debug("Opening dataurl connection");
DataUrlConnectionSPI retVal = defaultDataUrlConnection.newInstance();
retVal.init(url);
return retVal;
diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnectionImpl.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnectionImpl.java index 775f4136..6ad0bb78 100644 --- a/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnectionImpl.java +++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnectionImpl.java @@ -91,11 +91,13 @@ public class DataUrlConnectionImpl implements DataUrlConnectionSPI { String name = headerIt.next(); connection.setRequestProperty(name, requestHttpHeaders.get(name)); } + log.trace("Connecting to: "+url); connection.connect(); if (connection instanceof HttpsURLConnection) { HttpsURLConnection ssl = (HttpsURLConnection) connection; X509Certificate[] certs = (X509Certificate[]) ssl.getServerCertificates(); if ((certs != null) && (certs.length >= 1)) { + log.trace("Server certificate: "+certs[0]); serverCertificate = certs[0]; } } @@ -142,7 +144,7 @@ public class DataUrlConnectionImpl implements DataUrlConnectionSPI { formParams.add(slResultPart); OutputStream os = connection.getOutputStream(); - + log.trace("Sending data"); Part[] parts = new Part[formParams.size()]; Part.sendParts(os, formParams.toArray(parts), boundary.getBytes()); os.close(); @@ -152,7 +154,8 @@ public class DataUrlConnectionImpl implements DataUrlConnectionSPI { is = connection.getInputStream(); } catch (IOException iox) { log.info(iox); - }
+ } + log.trace("Reading response");
result = new DataUrlResponse(url.toString(), connection.getResponseCode(), is); Map<String, String> responseHttpHeaders = new HashMap<String, String>(); Map<String, List<String>> httpHeaders = connection.getHeaderFields(); |