fix for NPE in JakartaHttpClient.setProxy

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5045 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
danielr 17 years ago
parent bb6a6fc233
commit f2d0bd7790

@ -444,12 +444,14 @@ public class JakartaCommonsHttpClient {
throw e;
}
final httpRemoteProxyConfig hostProxyConfig = getProxyConfig(host);
final String scheme = method.getURI().getScheme();
if(scheme != null && scheme.toLowerCase().startsWith("https") && !hostProxyConfig.useProxy4SSL()) {
// do not use proxy for HTTPS
return null;
if(hostProxyConfig != null) {
final String scheme = method.getURI().getScheme();
if(scheme != null && scheme.toLowerCase().startsWith("https") && !hostProxyConfig.useProxy4SSL()) {
// do not use proxy for HTTPS
return null;
}
addProxyAuth(method, hostProxyConfig);
}
addProxyAuth(method, hostProxyConfig);
return hostProxyConfig;
}

Loading…
Cancel
Save