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

Remove content type required setting #61043

Merged
merged 2 commits into from
Aug 12, 2020
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion docs/reference/migration/migrate_8_0/http.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,21 @@

// end::notable-breaking-changes[]

.The `http.content_type.required` setting has been removed.
[%collapsible]
====
*Details* +
The `http.content_type.required` setting was deprecated in Elasticsearch 6.0
and has been removed in Elasticsearch 8.0. The setting was introduced in
Elasticsearch 5.3 to prepare users for Elasticsearch 6.0, where content type
auto detection was removed for HTTP requests.

*Impact* +
Discontinue use of the `http.content_type.required` system property.
Specifying this property in `elasticsearch.yml` will result in an error on
startup.
====

.The `http.tcp_no_delay` setting has been replaced by `http.tcp.no_delay`.
[%collapsible]
====
Expand Down Expand Up @@ -35,4 +50,4 @@ Update your workflow and applications to assume `+` in a URL is encoded as
`%2B`. Discontinue use of the `es.rest.url_plus_as_space` system property.
Specifying this property in `elasticsearch.yml` will result in an error on
startup.
====
====
1 change: 0 additions & 1 deletion qa/full-cluster-restart/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ for (Version bwcVersion : BuildParams.bwcVersions.indexCompatible) {
numberOfNodes = 2
// some tests rely on the translog not being flushed
setting 'indices.memory.shard_inactive_time', '60m'
setting 'http.content_type.required', 'true'
setting 'path.repo', "${buildDir}/cluster/shared/repo/${baseName}"
}
}
Expand Down
1 change: 0 additions & 1 deletion qa/rolling-upgrade/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ for (Version bwcVersion : BuildParams.bwcVersions.wireCompatible) {

setting 'repositories.url.allowed_urls', 'http://snapshot.test*'
setting 'path.repo', "${buildDir}/cluster/shared/repo/${baseName}"
setting 'http.content_type.required', 'true'
}
}

Expand Down
1 change: 0 additions & 1 deletion qa/verify-version-constants/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ for (Version bwcVersion : BuildParams.bwcVersions.indexCompatible) {
testClusters {
"${baseName}" {
version = bwcVersion.toString()
setting 'http.content_type.required', 'true'
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ public void apply(Settings value, Settings current, Settings previous) {
HttpTransportSettings.SETTING_CORS_ALLOW_METHODS,
HttpTransportSettings.SETTING_CORS_ALLOW_HEADERS,
HttpTransportSettings.SETTING_HTTP_DETAILED_ERRORS_ENABLED,
HttpTransportSettings.SETTING_HTTP_CONTENT_TYPE_REQUIRED,
HttpTransportSettings.SETTING_HTTP_MAX_CONTENT_LENGTH,
HttpTransportSettings.SETTING_HTTP_MAX_CHUNK_SIZE,
HttpTransportSettings.SETTING_HTTP_MAX_HEADER_SIZE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

package org.elasticsearch.http;

import org.elasticsearch.common.Booleans;
import org.elasticsearch.common.network.NetworkService;
import org.elasticsearch.common.settings.Setting;
import org.elasticsearch.common.settings.Setting.Property;
Expand Down Expand Up @@ -72,15 +71,6 @@ public final class HttpTransportSettings {
intSetting("http.publish_port", -1, -1, Property.NodeScope);
public static final Setting<Boolean> SETTING_HTTP_DETAILED_ERRORS_ENABLED =
Setting.boolSetting("http.detailed_errors.enabled", true, Property.NodeScope);
public static final Setting<Boolean> SETTING_HTTP_CONTENT_TYPE_REQUIRED =
new Setting<>("http.content_type.required", (s) -> Boolean.toString(true), (s) -> {
final boolean value = Booleans.parseBoolean(s);
if (value == false) {
throw new IllegalArgumentException("http.content_type.required cannot be set to false. It exists only to make a rolling" +
" upgrade easier");
}
return true;
}, Property.NodeScope, Property.Deprecated);
public static final Setting<ByteSizeValue> SETTING_HTTP_MAX_CONTENT_LENGTH =
Setting.byteSizeSetting(
"http.max_content_length",
Expand Down
1 change: 0 additions & 1 deletion x-pack/qa/rolling-upgrade/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ for (Version bwcVersion : BuildParams.bwcVersions.wireCompatible) {

setting 'repositories.url.allowed_urls', 'http://snapshot.test*'
setting 'path.repo', "${buildDir}/cluster/shared/repo/${baseName}"
setting 'http.content_type.required', 'true'
setting 'xpack.license.self_generated.type', 'trial'
setting 'xpack.security.enabled', 'true'
setting 'xpack.security.transport.ssl.enabled', 'true'
Expand Down