[prev in list] [next in list] [prev in thread] [next in thread]
List: wink-commits
Subject: svn commit: r1043177 -
From: bluk () apache ! org
Date: 2010-12-07 19:42:41
Message-ID: 20101207194241.90CA9238890B () eris ! apache ! org
[Download RAW message or body]
Author: bluk
Date: Tue Dec 7 19:42:41 2010
New Revision: 1043177
URL: http://svn.apache.org/viewvc?rev=1043177&view=rev
Log:
Fix some logging formatting
Modified:
incubator/wink/trunk/wink-client/src/main/java/org/apache/wink/client/internal/handlers/HttpURLConnectionHandler.java
Modified: incubator/wink/trunk/wink-client/src/main/java/org/apache/wink/client/internal/handlers/HttpURLConnectionHandler.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-client/src/main/java/org/a \
pache/wink/client/internal/handlers/HttpURLConnectionHandler.java?rev=1043177&r1=1043176&r2=1043177&view=diff
==============================================================================
--- incubator/wink/trunk/wink-client/src/main/java/org/apache/wink/client/internal/handlers/HttpURLConnectionHandler.java \
(original)
+++ incubator/wink/trunk/wink-client/src/main/java/org/apache/wink/client/internal/handlers/HttpURLConnectionHandler.java \
Tue Dec 7 19:42:41 2010 @@ -59,29 +59,31 @@ public class HttpURLConnectionHandler ex
}
}
- private boolean getBypassHostnameVerification(ClientRequest request, \
HttpURLConnection connection) { + private boolean \
getBypassHostnameVerification(ClientRequest request, + \
HttpURLConnection connection) {
return ((ClientConfig)request.getAttribute(WinkConfiguration.class))
.getBypassHostnameVerification() && (connection instanceof \
HttpsURLConnection); }
-
+
private HostnameVerifier setupHostnameVerificationBypass(HttpsURLConnection \
connection) { HttpsURLConnection https = ((HttpsURLConnection)connection);
HostnameVerifier hv = https.getHostnameVerifier();
https.setHostnameVerifier(new HostnameVerifier() {
public boolean verify(String urlHostName, SSLSession session) {
- logger.trace("Bypassing hostname verification: URL host is " + \
urlHostName //$NON-NLS-1$
- + ", SSLSession host is " //$NON-NLS-1$
- + session.getPeerHost());
+ logger
+ .trace("Bypassing hostname verification: URL host is {}, \
SSLSession host is {}", urlHostName, //$NON-NLS-1$ + \
session.getPeerHost()); return true;
}
});
return hv;
}
-
- private void teardownHostnameVerificationBypass(HttpsURLConnection connection, \
HostnameVerifier hv) { +
+ private void teardownHostnameVerificationBypass(HttpsURLConnection connection,
+ HostnameVerifier hv) {
connection.setHostnameVerifier(hv);
}
-
+
private HttpURLConnection processRequest(ClientRequest request, HandlerContext \
context) throws IOException {
HttpURLConnection connection = openConnection(request);
@@ -96,7 +98,7 @@ public class HttpURLConnectionHandler ex
connection.connect();
} finally {
if (getBypassHostnameVerification(request, connection)) {
- teardownHostnameVerificationBypass((HttpsURLConnection) connection, \
hv); + \
teardownHostnameVerificationBypass((HttpsURLConnection)connection, hv); }
}
if (request.getEntity() != null) {
@@ -182,7 +184,7 @@ public class HttpURLConnectionHandler ex
processResponseHeaders(response, connection);
} finally {
if (getBypassHostnameVerification(request, connection)) {
- teardownHostnameVerificationBypass((HttpsURLConnection) connection, \
hv); + \
teardownHostnameVerificationBypass((HttpsURLConnection)connection, hv); }
}
return response;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic