@Override public int getMaxRedirects() { return getIntegerOpt(MAX_REDIRECTS_CONFIG).orElse(defaultMaxRedirects()); }
public void testDefaultMaxRedirects() { Assert.assertEquals(AsyncHttpClientConfigDefaults.defaultMaxRedirects(), 5); testIntegerSystemProperty("maxRedirects", "defaultMaxRedirects", "100"); }
void configureDefaults() { maxConnections = defaultMaxConnections(); maxConnectionsPerHost = defaultMaxConnectionsPerHost(); name = defaultName(); connectTimeout = defaultConnectTimeout(); webSocketTimeout = defaultWebSocketTimeout(); pooledConnectionIdleTimeout = defaultPooledConnectionIdleTimeout(); readTimeout = defaultReadTimeout(); requestTimeout = defaultRequestTimeout(); connectionTTL = defaultConnectionTTL(); followRedirect = defaultFollowRedirect(); maxRedirects = defaultMaxRedirects(); compressionEnforced = defaultCompressionEnforced(); userAgent = defaultUserAgent(); allowPoolingConnections = defaultAllowPoolingConnections(); maxRequestRetry = defaultMaxRequestRetry(); ioThreadMultiplier = defaultIoThreadMultiplier(); allowPoolingSslConnections = defaultAllowPoolingSslConnections(); disableUrlEncodingForBoundRequests = defaultDisableUrlEncodingForBoundRequests(); strict302Handling = defaultStrict302Handling(); acceptAnyCertificate = defaultAcceptAnyCertificate(); sslSessionCacheSize = defaultSslSessionCacheSize(); sslSessionTimeout = defaultSslSessionTimeout(); if (defaultUseProxySelector()) { proxyServerSelector = ProxyUtils.getJdkDefaultProxyServerSelector(); } else if (defaultUseProxyProperties()) { proxyServerSelector = ProxyUtils.createProxyServerSelector(System.getProperties()); } }