Fix: Use system default ProxySelector in HttpClient #2388 by combe4259 · Pull Request #2390 · jhy/jsoup (original) (raw)
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.