Skip to content

Commit

Permalink
Add automatic support in WebClient for JVM http.proxyHost and related…
Browse files Browse the repository at this point in the history
… properties (helidon-io#7322)

Signed-off-by: Jorge Bescos Gascon <[email protected]>
  • Loading branch information
jbescos authored Aug 8, 2023
1 parent d396957 commit f040c33
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ private Builder() {
@Override
public Proxy build() {
if ((host == null || host.isEmpty()) && systemSelector == null) {
return NO_PROXY;
useSystemSelector(true);
}
return new Proxy(this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,18 @@ void testDefaultProxyType() {
assertThat(proxy.type(), is(Proxy.ProxyType.HTTP));
}

@Test
void testDefaultSystem1() {
Proxy proxy = Proxy.create();
assertThat(proxy.type(), is(Proxy.ProxyType.SYSTEM));
}

@Test
void testDefaultSystem2() {
Proxy proxy = Proxy.create(Config.empty());
assertThat(proxy.type(), is(Proxy.ProxyType.SYSTEM));
}

private void validateRelativizeNoProxy(WebClientConfiguration webConfig) {
boolean relativeUris = webConfig.relativeUris();
Proxy proxy = webConfig.proxy().get();
Expand Down

0 comments on commit f040c33

Please sign in to comment.