-
Notifications
You must be signed in to change notification settings - Fork 690
Description
For proxy authorization we are forced to use one-time tokens. This leads to the fact that PooledConnectionProvide.channelPools grows for each request. This happens because in the ProxyProvider class, ProxyProvider.httpHeaders are used to calculate hashCode, in which the token changes for each request. Due to different hashCode, unequal PoolKey are created
Expected Behavior
One connection pool must be used
Actual Behavior
New pools are created for each request
Steps to Reproduce
Literally add such a proxy setting to any WebClient and it should reproduce
private HttpClient setUpProxy(HttpClient currClient) {
return currClient.proxy(
pr -> pr.type(ProxyProvider.Proxy.HTTP)
.host(proxyConfig.getHost())
.port(proxyConfig.getPort())
.httpHeaders(h -> h.add(HttpHeaders.PROXY_AUTHORIZATION, UUID.randomUUID().toString()))
);
}Possible Solution
Maybe add a reduction or toggle to enable/disable ProxyProvider.httpHeaders in the hashCode calculation
Your Environment
- Reactor version(s) used: io.projectreactor.netty:reactor-netty:1.2.8 io.projectreactor.netty:reactor-netty-core:1.2.8 io.projectreactor.netty:reactor-netty-http:1.2.8
- JVM version (
java -version): jdk 21 - OS and version (eg.
uname -a): windows\linux

Metadata
Metadata
Assignees
Labels
type/enhancementA general enhancementA general enhancement