Hello,

so I'm getting closer. Because I was
using PoolingAsyncClientConnectionManager I decided to replace it
with PoolingHttpClientConnectionManager and it worked. So the problem is
not in the SNI but in the PoolingAsyncClientConnectionManager. I am
following this guide exactly:
https://hc.apache.org/httpcomponents-client-5.2.x/migration-guide/migration-to-async-simple.html

and I don't know what to do - I always get
org.apache.hc.core5.util.TimeoutValueException.

This is my code:
----------------------------------------------------------------------------------------------------------------------------------------------------
try {
            final SSLContext sslcontext =
SSLContexts.custom().loadTrustMaterial((chain, authType) -> true).build();

            int timeout = 15;

            PoolingAsyncClientConnectionManager ccm =
PoolingAsyncClientConnectionManagerBuilder.create().setTlsStrategy(ClientTlsStrategyBuilder.create()
                    .setSslContext(sslcontext)
                    .setTlsVersions(TLS.V_1_2)
                    .setHostnameVerifier(
                        NoopHostnameVerifier.INSTANCE)
                    .build())
                .setConnectionTimeToLive(TimeValue.ofMinutes(1L)).build();

            try (CloseableHttpAsyncClient httpclient =
HttpAsyncClients.custom().setConnectionManager(ccm).setDefaultRequestConfig(

RequestConfig.custom().setConnectTimeout(Timeout.ofSeconds(timeout)).setResponseTimeout(Timeout.ofSeconds(timeout))

.setCookieSpec("STANDARD_STRICT").build()).setVersionPolicy(HttpVersionPolicy.NEGOTIATE).build())
{

                httpclient.start();

                SimpleHttpRequest httpGet = SimpleHttpRequests.get(new
URI(restBaseUrl + "auth"));
                httpGet.setHeader("X-Nemesis-Username", username);
                httpGet.setHeader("X-Nemesis-Password", password);

                Future<SimpleHttpResponse> future =
httpclient.execute(httpGet, null);

                SimpleHttpResponse response = future.get(timeout,
TimeUnit.SECONDS);

                final String responseText =
response.getBody().getBodyText();
----------------------------------------------------------------------------------------------------------------------------------------------------
and the worst part is I don't know how to debug it.
Here's the log:

=====================================================================================
2023-08-11 13:07:14,876 [https-jsse-nio-0.0.0.0-8443-exec-7] DEBUG:
ex-00000002: preparing request execution
2023-08-11 13:07:14,876 [https-jsse-nio-0.0.0.0-8443-exec-7] DEBUG: Cookie
spec selected: STANDARD_STRICT
2023-08-11 13:07:14,876 [https-jsse-nio-0.0.0.0-8443-exec-7] DEBUG:
Unsupported cookie spec: STANDARD_STRICT
2023-08-11 13:07:14,876 [https-jsse-nio-0.0.0.0-8443-exec-7] DEBUG: Auth
cache not set in the context
2023-08-11 13:07:14,876 [https-jsse-nio-0.0.0.0-8443-exec-7] DEBUG:
ex-00000002: target auth state: UNCHALLENGED
2023-08-11 13:07:14,876 [https-jsse-nio-0.0.0.0-8443-exec-7] DEBUG:
ex-00000002: proxy auth state: UNCHALLENGED
2023-08-11 13:07:14,876 [https-jsse-nio-0.0.0.0-8443-exec-7] DEBUG:
ex-00000002: acquiring connection with route {s}->https://localhost:8112
2023-08-11 13:07:14,876 [https-jsse-nio-0.0.0.0-8443-exec-7] DEBUG:
ex-00000002: acquiring endpoint (3 MINUTES)
2023-08-11 13:07:14,876 [https-jsse-nio-0.0.0.0-8443-exec-7] DEBUG:
ex-00000002: endpoint lease request (3 MINUTES) [route:
{s}->https://localhost:8112][total available: 0; route allocated: 0 of 5;
total allocated: 0 of 25]
2023-08-11 13:07:14,876 [https-jsse-nio-0.0.0.0-8443-exec-7] DEBUG:
ex-00000002: endpoint leased [route: {s}->https://localhost:8112][total
available: 0; route allocated: 1 of 5; total allocated: 1 of 25]
2023-08-11 13:07:14,876 [https-jsse-nio-0.0.0.0-8443-exec-7] DEBUG:
ex-00000002: acquired ep-00000001
2023-08-11 13:07:14,876 [https-jsse-nio-0.0.0.0-8443-exec-7] DEBUG:
ex-00000002: acquired endpoint ep-00000001
2023-08-11 13:07:14,876 [https-jsse-nio-0.0.0.0-8443-exec-7] DEBUG:
ep-00000001: connecting endpoint (15 SECONDS)
2023-08-11 13:07:14,876 [https-jsse-nio-0.0.0.0-8443-exec-7] DEBUG:
ep-00000001: connecting endpoint to https://localhost:8112 (15 SECONDS)
2023-08-11 13:07:14,876 [https-jsse-nio-0.0.0.0-8443-exec-7] DEBUG:
https://localhost:8112: resolving remote address
2023-08-11 13:07:14,876 [https-jsse-nio-0.0.0.0-8443-exec-7] DEBUG:
https://localhost:8112: resolved to [localhost/127.0.0.1]
2023-08-11 13:07:14,877 [https-jsse-nio-0.0.0.0-8443-exec-7] DEBUG:
https://localhost:8112: connecting null to localhost/127.0.0.1:8112 (15
SECONDS)
2023-08-11 13:07:14,877 [httpclient-dispatch-1] DEBUG:
https://localhost:8112: connected c-0000000001 /127.0.0.1:52420->localhost/
127.0.0.1:8112
2023-08-11 13:07:14,877 [httpclient-dispatch-1] DEBUG: c-0000000001: start
TLS
2023-08-11 13:07:14,877 [httpclient-dispatch-1] DEBUG: ep-00000001:
connected c-0000000001
2023-08-11 13:07:14,877 [httpclient-dispatch-1] DEBUG: ep-00000001:
endpoint connected
2023-08-11 13:07:14,877 [httpclient-dispatch-1] DEBUG: ex-00000002:
connected to target
2023-08-11 13:07:14,877 [httpclient-dispatch-1] DEBUG: ex-00000002: route
fully established
2023-08-11 13:07:14,877 [httpclient-dispatch-1] DEBUG: ex-00000002:
executing GET /storefront/rest/auth HTTP/1.1
2023-08-11 13:07:14,877 [httpclient-dispatch-1] DEBUG: ep-00000001: start
execution ex-00000002
2023-08-11 13:07:14,877 [httpclient-dispatch-1] DEBUG: ep-00000001:
executing exchange ex-00000002 over c-0000000001
2023-08-11 13:07:14,877 [httpclient-dispatch-1] DEBUG: c-0000000001:
RequestExecutionCommand with NORMAL priority
2023-08-11 13:07:14,877 [httpclient-dispatch-1] DEBUG:
c-0000000001[ACTIVE][rwc:c][ACTIVE][rw][NOT_HANDSHAKING][0][0][0] Enqueued
RequestExecutionCommand with priority IMMEDIATE
2023-08-11 13:07:14,877 [httpclient-dispatch-1] DEBUG: c-0000000001
c-0000000001[ACTIVE][rw:c][ACTIVE][rw][NOT_HANDSHAKING][0][0][0]: Event
cleared [c]
2023-08-11 13:07:14,878 [httpclient-dispatch-1] DEBUG: Enabled protocols:
[TLSv1.2]
2023-08-11 13:07:14,878 [httpclient-dispatch-1] DEBUG: Enabled cipher
suites:[TLS_AES_256_GCM_SHA384, TLS_AES_128_GCM_SHA256,
TLS_CHACHA20_POLY1305_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_RSA_WITH_AES_256_GCM_SHA384,
TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256,
TLS_DHE_DSS_WITH_AES_256_GCM_SHA384, TLS_DHE_RSA_WITH_AES_128_GCM_SHA256,
TLS_DHE_DSS_WITH_AES_128_GCM_SHA256,
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_RSA_WITH_AES_256_CBC_SHA256,
TLS_DHE_DSS_WITH_AES_256_CBC_SHA256, TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,
TLS_DHE_DSS_WITH_AES_128_CBC_SHA256,
TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384,
TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384,
TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256,
TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256,
TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384,
TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384,
TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256,
TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA,
TLS_DHE_DSS_WITH_AES_256_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA,
TLS_DHE_DSS_WITH_AES_128_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA,
TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA,
TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_256_GCM_SHA384,
TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256,
TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA,
TLS_RSA_WITH_AES_128_CBC_SHA, TLS_EMPTY_RENEGOTIATION_INFO_SCSV]
2023-08-11 13:07:14,898 [httpclient-dispatch-1] DEBUG: Secure session
established
2023-08-11 13:07:14,899 [httpclient-dispatch-1] DEBUG:  negotiated
protocol: TLSv1.2
2023-08-11 13:07:14,899 [httpclient-dispatch-1] DEBUG:  negotiated cipher
suite: TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
2023-08-11 13:07:14,899 [httpclient-dispatch-1] DEBUG:  peer principal:
CN=Nemesis Software, OU=Development, O=Nemesis Software, L=Sofia, ST=Sofia,
C=BG
2023-08-11 13:07:14,899 [httpclient-dispatch-1] DEBUG:  peer alternative
names: [localhost, 127.0.0.1]
2023-08-11 13:07:14,899 [httpclient-dispatch-1] DEBUG:  issuer principal:
CN=Nemesis Software, OU=Development, O=Nemesis Software, L=Sofia, ST=Sofia,
C=BG
2023-08-11 13:07:14,899 [httpclient-dispatch-1] DEBUG: ex-00000002: send
request GET /storefront/rest/auth HTTP/1.1, null entity
2023-08-11 13:07:14,899 [httpclient-dispatch-1] DEBUG: c-0000000001 >> GET
/storefront/rest/auth HTTP/1.1
2023-08-11 13:07:14,899 [httpclient-dispatch-1] DEBUG: c-0000000001 >>
X-Nemesis-Username: admin
2023-08-11 13:07:14,899 [httpclient-dispatch-1] DEBUG: c-0000000001 >>
X-Nemesis-Password: nimda
2023-08-11 13:07:14,899 [httpclient-dispatch-1] DEBUG: c-0000000001 >>
User-Agent: Apache-HttpAsyncClient/5.0.2 (Java/17)
2023-08-11 13:07:14,899 [httpclient-dispatch-1] DEBUG: c-0000000001 >>
Host: localhost:8112
2023-08-11 13:07:14,899 [httpclient-dispatch-1] DEBUG: c-0000000001 >>
Connection: keep-alive
2023-08-11 13:07:14,899 [httpclient-dispatch-1] DEBUG: c-0000000001
c-0000000001[ACTIVE][r:r][ACTIVE][rw][NOT_HANDSHAKING][0][0][0]: 190 bytes
written
2023-08-11 13:07:14,899 [httpclient-dispatch-1] DEBUG: c-0000000001 >> "GET
/storefront/rest/auth HTTP/1.1[\r][\n]"
2023-08-11 13:07:14,899 [httpclient-dispatch-1] DEBUG: c-0000000001 >>
"X-Nemesis-Username: admin[\r][\n]"
2023-08-11 13:07:14,899 [httpclient-dispatch-1] DEBUG: c-0000000001 >>
"X-Nemesis-Password: nimda[\r][\n]"
2023-08-11 13:07:14,899 [httpclient-dispatch-1] DEBUG: c-0000000001 >>
"User-Agent: Apache-HttpAsyncClient/5.0.2 (Java/17)[\r][\n]"
2023-08-11 13:07:14,899 [httpclient-dispatch-1] DEBUG: c-0000000001 >>
"Host: localhost:8112[\r][\n]"
2023-08-11 13:07:14,899 [httpclient-dispatch-1] DEBUG: c-0000000001 >>
"Connection: keep-alive[\r][\n]"
2023-08-11 13:07:14,899 [httpclient-dispatch-1] DEBUG: c-0000000001 >>
"[\r][\n]"
2023-08-11 13:07:14,900 [httpclient-dispatch-1] DEBUG: c-0000000001
c-0000000001[ACTIVE][rw:r][ACTIVE][rw][NOT_HANDSHAKING][0][0][0]: Event set
[w]
2023-08-11 13:07:14,900 [httpclient-dispatch-1] DEBUG: c-0000000001
c-0000000001[ACTIVE][r:r][ACTIVE][r][NOT_HANDSHAKING][0][0][0]: Event
cleared [w]
2023-08-11 13:07:14,900 [httpclient-dispatch-1] DEBUG: c-0000000001
c-0000000001[ACTIVE][r:r][ACTIVE][r][NOT_HANDSHAKING][44][15][0]: 0 bytes
read
2023-08-11 13:07:29,877 [https-jsse-nio-0.0.0.0-8443-exec-7] DEBUG:
Shutdown GRACEFUL
2023-08-11 13:07:29,877 [httpclient-dispatch-1] DEBUG:
c-0000000001[ACTIVE][rw:r][ACTIVE][rw][NOT_HANDSHAKING][0][0][0] Enqueued
ShutdownCommand with priority IMMEDIATE
2023-08-11 13:07:29,877 [httpclient-dispatch-1] DEBUG: c-0000000001
c-0000000001[ACTIVE][r:w][ACTIVE][r][NOT_HANDSHAKING][0][0][0]: Event
cleared [w]
2023-08-11 13:07:29,877 [httpclient-dispatch-1] DEBUG: c-0000000001
c-0000000001[ACTIVE][rw:w][ACTIVE][rw][NOT_HANDSHAKING][0][0][0]: Event set
[w]
2023-08-11 13:07:29,878 [httpclient-dispatch-1] DEBUG: c-0000000001
c-0000000001[ACTIVE][r:w][ACTIVE][r][NOT_HANDSHAKING][0][0][0]: Event
cleared [w]
2023-08-11 13:07:34,877 [https-jsse-nio-0.0.0.0-8443-exec-7] DEBUG:
c-0000000001
c-0000000001[ACTIVE][r:w][ACTIVE][r][NOT_HANDSHAKING][0][0][0]: Close
GRACEFUL
2023-08-11 13:07:34,877 [httpclient-dispatch-1] DEBUG: ex-00000002:
execution failed: Connection is closed
2023-08-11 13:07:34,878 [https-jsse-nio-0.0.0.0-8443-exec-7] DEBUG:
Shutdown connection pool GRACEFUL
2023-08-11 13:07:34,878 [httpclient-dispatch-1] DEBUG: ex-00000002: request
failed: Connection is closed
2023-08-11 13:07:34,878 [https-jsse-nio-0.0.0.0-8443-exec-7] DEBUG:
c-0000000001: Shutdown connection GRACEFUL
2023-08-11 13:07:34,878 [httpclient-dispatch-1] DEBUG: ep-00000001: close
IMMEDIATE
2023-08-11 13:07:34,878 [https-jsse-nio-0.0.0.0-8443-exec-7] DEBUG:
Connection pool shut down
2023-08-11 13:07:34,878 [httpclient-dispatch-1] DEBUG: ep-00000001:
endpoint closed
2023-08-11 13:07:34,878 [httpclient-dispatch-1] DEBUG: ep-00000001:
discarding endpoint
2023-08-11 13:07:34,878 [httpclient-dispatch-1] DEBUG: ep-00000001:
releasing endpoint
2023-08-11 13:07:34,878 [httpclient-dispatch-1] DEBUG: ep-00000001:
connection released [route: {s}->https://localhost:8112][total available:
0; route allocated: 0 of 5; total allocated: 0 of 25]
2023-08-11 13:07:34,878 [https-jsse-nio-0.0.0.0-8443-exec-7] ERROR: Timeout
deadline: 15000 MILLISECONDS, actual: 15000 MILLISECONDS
org.apache.hc.core5.util.TimeoutValueException: Timeout deadline: 15000
MILLISECONDS, actual: 15000 MILLISECONDS
at
org.apache.hc.core5.util.TimeoutValueException.fromMilliseconds(TimeoutValueException.java:49)
at org.apache.hc.core5.concurrent.BasicFuture.get(BasicFuture.java:107)
at
io.nemesis.console.backend.storefront.DefaultRestAuthenticationProvider.authenticate(DefaultRestAuthenticationProvider.java:114)
at
org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:182)
at
org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:201)
at
org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter.attemptAuthentication(UsernamePasswordAuthenticationFilter.java:85)
at
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:231)
at
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:221)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361)
at
org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:107)
at
org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:93)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361)
at
org.springframework.security.web.csrf.CsrfFilter.doFilterInternal(CsrfFilter.java:132)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361)
at
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:117)
at
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361)
at
org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:62)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361)
at
org.springframework.security.web.session.DisableEncodeUrlFilter.doFilterInternal(DisableEncodeUrlFilter.java:42)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361)
at
org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:225)
at
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:190)
at
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)
at
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:177)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)
at
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
at
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:891)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1784)
at
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at
org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
at
org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:833)
2023-08-11 13:07:34,878 [https-jsse-nio-0.0.0.0-8443-exec-7] ERROR: An
internal error occurred while trying to authenticate the user.
org.springframework.security.authentication.InternalAuthenticationServiceException:
Timeout deadline: 15000 MILLISECONDS, actual: 15000 MILLISECONDS
at
io.nemesis.console.backend.storefront.DefaultRestAuthenticationProvider.authenticate(DefaultRestAuthenticationProvider.java:137)
at
org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:182)
at
org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:201)
at
org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter.attemptAuthentication(UsernamePasswordAuthenticationFilter.java:85)
at
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:231)
at
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:221)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361)
at
org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:107)
at
org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:93)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361)
at
org.springframework.security.web.csrf.CsrfFilter.doFilterInternal(CsrfFilter.java:132)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361)
at
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:117)
at
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361)
at
org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:62)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361)
at
org.springframework.security.web.session.DisableEncodeUrlFilter.doFilterInternal(DisableEncodeUrlFilter.java:42)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361)
at
org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:225)
at
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:190)
at
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)
at
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:177)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)
at
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
at
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:891)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1784)
at
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at
org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
at
org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:833)
=====================================================================================


На пт, 11.08.2023 г. в 10:58 ч. Oleg Kalnichevski <ol...@apache.org> написа:

> On Thu, 2023-08-10 at 22:40 +0300, Petar Tahchiev wrote:
> > Hmm,
> >
> > I tried now setting the Host header:
> >
> >
> > httpGet.setHeader("Host", "localhost");
> >
> >
>
> This is wrong. You should not be doing that. You should let HttpClient
> generate the Host header when appropriate. HttpClient will also
> automatically take care of SNI for you.
>
> Oleg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
> For additional commands, e-mail: httpclient-users-h...@hc.apache.org
>
>

-- 
Regards, Petar!
Karlovo, Bulgaria.
---
Public PGP Key at:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x19658550C3110611
Key Fingerprint: A369 A7EE 61BC 93A3 CDFF  55A5 1965 8550 C311 0611

Reply via email to