Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DESC-227 #1665

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions store/src/java/com/zimbra/cs/service/FeedManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
import org.apache.http.impl.auth.BasicScheme;
import org.apache.http.impl.client.BasicAuthCache;
import org.apache.http.impl.client.BasicCredentialsProvider;
import org.apache.http.impl.client.DefaultRedirectStrategy;
import org.apache.http.impl.client.HttpClientBuilder;

import com.google.common.annotations.VisibleForTesting;
Expand Down Expand Up @@ -405,8 +404,6 @@ private static RemoteDataInfo retrieveRemoteData(String url, Folder.SyncData fsd
throw ServiceException.INVALID_REQUEST("invalid url for feed: " + url, null);
}

DefaultRedirectStrategy redirectStrategy = new DefaultRedirectStrategy();
clientBuilder.setRedirectStrategy(redirectStrategy);

get.addHeader("User-Agent", HTTP_USER_AGENT);
get.addHeader("Accept", HTTP_ACCEPT);
Expand All @@ -415,7 +412,7 @@ private static RemoteDataInfo retrieveRemoteData(String url, Folder.SyncData fsd
get.addHeader("If-Modified-Since", lastSyncAt);
}

HttpClient client = clientBuilder.build();
HttpClient client = clientBuilder.disableRedirectHandling().build();
HttpResponse response = HttpClientUtil.executeMethod(client, get, context);

Header locationHeader = response.getFirstHeader("location");
Expand Down