Changeset 3093
- Timestamp:
- 01/23/12 15:19:20 (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DataCleaner/trunk/core/src/main/java/org/eobjects/datacleaner/util/HttpXmlUtils.java
r2503 r3093 92 92 final int proxyPort = _userPreferences.getProxyPort(); 93 93 94 final HttpHost proxy = new HttpHost(proxyHostname, proxyPort); 95 httpClient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy); 94 try { 95 final HttpHost proxy = new HttpHost(proxyHostname, proxyPort); 96 httpClient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy); 96 97 97 if (_userPreferences.isProxyAuthenticationEnabled()) { 98 final AuthScope authScope = new AuthScope(proxyHostname, proxyPort); 99 final UsernamePasswordCredentials credentials = new UsernamePasswordCredentials( 100 _userPreferences.getProxyUsername(), _userPreferences.getProxyPassword()); 101 httpClient.getCredentialsProvider().setCredentials(authScope, credentials); 98 if (_userPreferences.isProxyAuthenticationEnabled()) { 99 final AuthScope authScope = new AuthScope(proxyHostname, proxyPort); 100 final UsernamePasswordCredentials credentials = new UsernamePasswordCredentials( 101 _userPreferences.getProxyUsername(), _userPreferences.getProxyPassword()); 102 httpClient.getCredentialsProvider().setCredentials(authScope, credentials); 103 } 104 } catch (Exception e) { 105 // ignore proxy creation and return http client without it 106 logger.error("Unexpected error occurred while initializing HTTP proxy", e); 102 107 } 103 108 }
Note: See TracChangeset
for help on using the changeset viewer.
