Hi, I noticed JDK-8328894 [1] has been open since March 2024 and would like to help if possible.
I've analyzed the issue and created a potential fix that preserves the proxy response body for 407 authentication errors in HTTPS tunneling. The fix: - Changes CONNECT exchange from MultiExchange<Void> to MultiExchange<byte[]> - Caches the proxy response body and returns it through Exchange.readBodyAsync() - Adds a test case (ProxyAuthHttpsTest.java) to verify the behavior The root cause is that HTTPS uses CONNECT tunneling with a Void body type, and the 407 response body was being discarded via ignoreBody() instead of being preserved for the application. I've tested this locally and confirmed it addresses the issue: - Before: https:// with 407 returns null body - After: https:// with 407 returns body correctly (matching http:// behavior) I'd be happy to submit a PR or share more details about the approach if helpful. Thanks, Hyunsu Eun [1] https://bugs.openjdk.org/browse/JDK-8328894
