Skip to content
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

fix: silently ignore empty proxy host values #1099

Merged
merged 2 commits into from
Jun 5, 2024
Merged

Conversation

ianbotsf
Copy link
Contributor

@ianbotsf ianbotsf commented Jun 5, 2024

Issue #

Closes #1098

Description of changes

This changes adds handling for empty/blank proxy host values sourced from environment variables and system properties. The previous behavior was to throw an exception because blank strings couldn't be parsed into hosts.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ianbotsf ianbotsf requested a review from a team as a code owner June 5, 2024 17:37

This comment has been minimized.

@@ -49,6 +49,10 @@ class EnvironmentProxySelectorTest {
private val tests = listOf(
// no props
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For completeness should we also test a blank string for the http.nonProxyHosts property and NO_PROXY environment variable?

Copy link

github-actions bot commented Jun 5, 2024

Affected Artifacts

Changed in size
Artifact Pull Request (bytes) Latest Release (bytes) Delta (bytes) Delta (percentage)
logging-slf4j2-jvm.jar 24,181 24,134 47 0.19%
http-client-jvm.jar 331,000 330,756 244 0.07%

@ianbotsf ianbotsf merged commit 95d9b34 into main Jun 5, 2024
15 checks passed
@ianbotsf ianbotsf deleted the fix-empty-proxy-hosts branch June 5, 2024 18:20
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.

Check for empty proxy hosts
2 participants