summaryrefslogtreecommitdiff
path: root/bkucommon/src/main/java/at/gv/egiz
diff options
context:
space:
mode:
Diffstat (limited to 'bkucommon/src/main/java/at/gv/egiz')
-rw-r--r--bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrl.java3
-rw-r--r--bkucommon/src/main/java/at/gv/egiz/bku/binding/DataUrlConnectionImpl.java7
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();