Skip to content

Commit

Permalink
Merge pull request quarkusio#44708 from IvanBaricic/main
Browse files Browse the repository at this point in the history
Fix invalid proxy setting when the port ends with a whitespace
  • Loading branch information
geoand authored Nov 29, 2024
2 parents 1f6a3a9 + 2654019 commit da9fbf0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@
import io.quarkus.runtime.annotations.ConfigPhase;
import io.quarkus.runtime.annotations.ConfigRoot;
import io.quarkus.runtime.configuration.MemorySize;
import io.quarkus.runtime.configuration.TrimmedStringConverter;
import io.smallrye.config.ConfigMapping;
import io.smallrye.config.ConfigValue;
import io.smallrye.config.SmallRyeConfig;
import io.smallrye.config.WithConverter;
import io.smallrye.config.WithDefault;
import io.smallrye.config.WithDefaults;
import io.smallrye.config.WithKeys;
Expand Down Expand Up @@ -58,7 +60,7 @@ public interface RestClientsConfig {
* <p>
* Can be overwritten by client-specific settings.
*/
Optional<String> proxyAddress();
Optional<@WithConverter(TrimmedStringConverter.class) String> proxyAddress();

/**
* Proxy username, equivalent to the http.proxy or https.proxy JVM settings.
Expand Down Expand Up @@ -449,7 +451,7 @@ default Optional<String> uriReload() {
* <p>
* Use `none` to disable proxy
*/
Optional<String> proxyAddress();
Optional<@WithConverter(TrimmedStringConverter.class) String> proxyAddress();

/**
* Proxy username.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ quarkus.rest-client.client-prefix.providers=io.quarkus.rest.client.reactive.Hell
quarkus.rest-client.client-prefix.connect-timeout=5000
quarkus.rest-client.client-prefix.read-timeout=6000
quarkus.rest-client.client-prefix.follow-redirects=true
quarkus.rest-client.client-prefix.proxy-address=localhost:8080
# intentionally add whitespace at the end to ensure we strip it
quarkus.rest-client.client-prefix.proxy-address=localhost:8080
quarkus.rest-client.client-prefix.query-param-style=COMMA_SEPARATED
quarkus.rest-client.client-prefix.connection-ttl=30000
quarkus.rest-client.client-prefix.connection-pool-size=10
Expand Down

0 comments on commit da9fbf0

Please sign in to comment.