Skip to content

Commit

Permalink
Reinstating the original timeout behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
dxasupport committed Oct 4, 2024
1 parent 71cf73f commit 1e266f0
Showing 1 changed file with 0 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import com.sdl.webapp.common.api.content.StaticContentNotLoadedException;
import org.apache.commons.io.IOUtils;
import org.apache.http.HttpHost;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
Expand All @@ -23,8 +22,6 @@
@Profile("!cil.providers.active")
public class BinaryContentDownloader {

private static final Integer TIMEOUT_IN_MILLIS = 10000;

private final CloseableHttpClient httpclient;

@Autowired
Expand Down Expand Up @@ -79,8 +76,6 @@ public byte[] downloadContent(File file, String downloadUrl) throws StaticConten

public byte[] downloadContentInternal(File file, String downloadUrl) throws UnauthorizedException, StaticContentNotLoadedException {
HttpGet httpGet = new HttpGet(downloadUrl);
RequestConfig params = RequestConfig.custom().setConnectTimeout(TIMEOUT_IN_MILLIS).setSocketTimeout(TIMEOUT_IN_MILLIS).build();
httpGet.setConfig(params);
authentication.applyManualAuthentication(httpGet);
try (CloseableHttpResponse response = httpclient.execute(httpGet)) {
InputStream contentStream = response.getEntity().getContent();
Expand Down

0 comments on commit 1e266f0

Please sign in to comment.