You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/12/29 10:21:57 UTC
[GitHub] [pulsar-manager] nodece commented on a diff in pull request #503: Fix 307 redirect errors when connecting to multi-broker cluster
nodece commented on code in PR #503:
URL: https://github.com/apache/pulsar-manager/pull/503#discussion_r1058866953
##########
src/main/java/org/apache/pulsar/manager/zuul/HttpsClientConfiguration.java:
##########
@@ -46,6 +52,24 @@ public class HttpsClientConfiguration {
@Bean
public CloseableHttpClient httpClient() throws Exception {
+ LaxRedirectStrategy customLaxRedirectStrategy = new LaxRedirectStrategy() {
+ private final String[] redirectHttpMethods = new String[] {
+ HttpGet.METHOD_NAME,
+ HttpPost.METHOD_NAME,
+ HttpHead.METHOD_NAME,
+ HttpDelete.METHOD_NAME,
+ HttpPut.METHOD_NAME
+ };
+ @Override
+ protected boolean isRedirectable(final String method) {
+ for (final String m: redirectHttpMethods) {
Review Comment:
I think we can return `true` directly, don't check the HTTP methods.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org