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

Location of the default value for header validation changed #2228

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -41,6 +41,7 @@ final class NettyClient implements WebClient {
private static final Duration DEFAULT_READ_TIMEOUT = Duration.ofMinutes(10);
private static final boolean DEFAULT_FOLLOW_REDIRECTS = false;
private static final boolean DEFAULT_KEEP_ALIVE = false;
private static final boolean DEFAULT_VALIDATE_HEADERS = true;
private static final int DEFAULT_NUMBER_OF_REDIRECTS = 5;
private static final LazyValue<String> DEFAULT_USER_AGENT = LazyValue
.create(() -> "Helidon/" + Version.VERSION + " (java " + System.getProperty("java.runtime.version") + ")");
Expand All @@ -63,6 +64,7 @@ final class NettyClient implements WebClient {
.proxy(DEFAULT_PROXY)
.tls(DEFAULT_TLS)
.keepAlive(DEFAULT_KEEP_ALIVE)
.validateHeaders(DEFAULT_VALIDATE_HEADERS)
.build();

// configurable per client instance
Expand Down
Expand Up @@ -301,7 +301,7 @@ static class Builder<B extends Builder<B, T>, T extends WebClientConfiguration>
private MessageBodyReaderContext readerContext;
private MessageBodyWriterContext writerContext;
private List<WebClientService> clientServices;
private boolean validateHeaders = true;
private boolean validateHeaders;
@SuppressWarnings("unchecked")
private B me = (B) this;

Expand Down Expand Up @@ -675,6 +675,7 @@ public B update(WebClientConfiguration configuration) {
writerContextParent(configuration.writerContext);
context(configuration.context);
keepAlive(configuration.keepAlive);
validateHeaders(configuration.validateHeaders);
configuration.cookieManager.defaultCookies().forEach(this::defaultCookie);
config = configuration.config;

Expand Down