Skip to content

Conversation

@combe4259
Copy link
Contributor

@jhy

Description

Fixes #2388

Problem

HttpClient ignores system default proxy (ProxySelector.getDefault()).

Solution

select(): perRequestProxy → system ProxySelector → NoProxy

connectFailed() (One tiny opinion):
Only forwards to system ProxySelector when it was actually used
Returns early for perRequestProxy (prevents incorrect failure reporting)

Testing

  • All 1696 tests pass
  • Added 2 unit tests for the new behavior

Thanks to @robseidel for reporting and suggesting the fix.

@jhy jhy added this to the 1.22.1 milestone Aug 28, 2025
@jhy jhy merged commit 3941022 into jhy:master Aug 28, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default proxy is ignored, when HttpClient is used (jsoup.useHttpClient=true or default from 1.21.1 onward)

2 participants