Skip to content

ReactorClientHttpRequestFactory should use HttpClient.create().proxyWithSystemProperties() #34849

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

Closed
siom79 opened this issue May 2, 2025 · 1 comment · May be fixed by #34850
Closed

ReactorClientHttpRequestFactory should use HttpClient.create().proxyWithSystemProperties() #34849

siom79 opened this issue May 2, 2025 · 1 comment · May be fixed by #34850
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: superseded An issue that has been superseded by another type: enhancement A general enhancement
Milestone

Comments

@siom79
Copy link

siom79 commented May 2, 2025

Currently the ReactorClientHttpRequestFactory creates within the default constructor an instance of HttpClient just with create():

	public ReactorClientHttpRequestFactory() {
		this(defaultInitializer.apply(HttpClient.create()));
	}

In this setup the HttpClient does not apply any system properties for proxy settings (like e.g. https.proxyHost and https.proxyPort ). Therefore the following code is necessary:

	public ReactorClientHttpRequestFactory() {
		this(defaultInitializer.apply(HttpClient.create().proxyWithSystemProperties()));
	}

As other http client implementations such as Apache HttpClient do apply system properties for proxies in the default setup, this should be the same for the netty http client inside the ReactorClientHttpRequestFactory.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label May 2, 2025
@bclozel bclozel added in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels May 2, 2025
@bclozel bclozel added this to the 7.0.0-M5 milestone May 2, 2025
siom79 added a commit to siom79/spring-framework that referenced this issue May 2, 2025
@bclozel
Copy link
Member

bclozel commented May 2, 2025

Superseded by #34850

@bclozel bclozel added the status: superseded An issue that has been superseded by another label May 2, 2025
@bclozel bclozel closed this as not planned Won't fix, can't repro, duplicate, stale May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: superseded An issue that has been superseded by another type: enhancement A general enhancement
Projects
None yet
3 participants