"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "flow-server/src/main/java/com/vaadin/flow/server/frontend/installer/DefaultFileDownloader.java" between
vaadin-flow-4.0.5.tar.gz and vaadin-flow-4.0.6.tar.gz

About: Vaadin flow is a Java framework binding Vaadin web components to Java.

DefaultFileDownloader.java  (vaadin-flow-4.0.5):DefaultFileDownloader.java  (vaadin-flow-4.0.6)
skipping to change at line 28 skipping to change at line 28
import java.io.File; import java.io.File;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import java.net.URI; import java.net.URI;
import java.net.URL; import java.net.URL;
import java.nio.channels.Channels; import java.nio.channels.Channels;
import java.nio.channels.ReadableByteChannel; import java.nio.channels.ReadableByteChannel;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils; import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpHost; import org.apache.http.HttpHost;
import org.apache.http.auth.AuthScope; import org.apache.http.auth.AuthScope;
import org.apache.http.auth.UsernamePasswordCredentials; import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.client.AuthCache; import org.apache.http.client.AuthCache;
import org.apache.http.client.CredentialsProvider; import org.apache.http.client.CredentialsProvider;
import org.apache.http.client.config.RequestConfig; import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.protocol.HttpClientContext; import org.apache.http.client.protocol.HttpClientContext;
import org.apache.http.impl.auth.BasicScheme; import org.apache.http.impl.auth.BasicScheme;
skipping to change at line 126 skipping to change at line 125
private CloseableHttpResponse execute(URI requestUri) throws IOException { private CloseableHttpResponse execute(URI requestUri) throws IOException {
CloseableHttpResponse response; CloseableHttpResponse response;
ProxyConfig.Proxy proxy = proxyConfig ProxyConfig.Proxy proxy = proxyConfig
.getProxyForUrl(requestUri.toString()); .getProxyForUrl(requestUri.toString());
if (proxy != null) { if (proxy != null) {
getLogger().info("Downloading via proxy {}", proxy.toString()); getLogger().info("Downloading via proxy {}", proxy.toString());
return executeViaProxy(proxy, requestUri); return executeViaProxy(proxy, requestUri);
} else { } else {
getLogger().info("No proxy was configured, downloading directly"); getLogger().info("No proxy was configured, downloading directly");
if (StringUtils.isNotEmpty(userName) && StringUtils if (userName != null && !userName.isEmpty() && password != null
.isNotEmpty(password)) { && !password.isEmpty()) {
getLogger().info("Using credentials ({})", userName); getLogger().info("Using credentials ({})", userName);
// Auth target host // Auth target host
URL aURL = requestUri.toURL(); URL aURL = requestUri.toURL();
HttpClientContext localContext = makeLocalContext(aURL); HttpClientContext localContext = makeLocalContext(aURL);
CredentialsProvider credentialsProvider = makeCredentialsProvide r( CredentialsProvider credentialsProvider = makeCredentialsProvide r(
aURL.getHost(), aURL.getPort(), userName, password); aURL.getHost(), aURL.getPort(), userName, password);
response = buildHttpClient(credentialsProvider) response = buildHttpClient(credentialsProvider)
.execute(new HttpGet(requestUri), localContext); .execute(new HttpGet(requestUri), localContext);
} else { } else {
response = buildHttpClient(null) response = buildHttpClient(null)
 End of changes. 2 change blocks. 
3 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)