OpenSearch/qa
Jay Modi 7520a107be Optionally require a valid content type for all rest requests with content (#22691)
This change adds a strict mode for xcontent parsing on the rest layer. The strict mode will be off by default for 5.x and in a separate commit will be enabled by default for 6.0. The strict mode, which can be enabled by setting `http.content_type.required: true` in 5.x, will require that all incoming rest requests have a valid and supported content type header before the request is dispatched. In the non-strict mode, the Content-Type header will be inspected and if it is not present or not valid, we will continue with auto detection of content like we have done previously.

The content type header is parsed to the matching XContentType value with the only exception being for plain text requests. This value is then passed on with the content bytes so that we can reduce the number of places where we need to auto-detect the content type.

As part of this, many transport requests and builders were updated to provide methods that
accepted the XContentType along with the bytes and the methods that would rely on auto-detection have been deprecated.

In the non-strict mode, deprecation warnings are issued whenever a request with body doesn't provide the Content-Type header.

See #19388
2017-02-02 14:07:13 -05:00
..
backwards-5.0 Optionally require a valid content type for all rest requests with content (#22691) 2017-02-02 14:07:13 -05:00
evil-tests Expose logs base path 2017-01-16 07:39:37 -05:00
multi-cluster-search Cut over to use affix setting for remote cluster configuration 2017-01-11 12:38:46 +01:00
no-bootstrap-tests Switch from standalone-test to standalone-rest-test 2017-01-05 10:55:47 +01:00
rolling-upgrade [TEST] upgrade backward compatibility version of rolling upgrade 2017-02-02 09:56:38 -05:00
smoke-test-client Switch from standalone-test to standalone-rest-test 2017-01-05 10:55:47 +01:00
smoke-test-http Optionally require a valid content type for all rest requests with content (#22691) 2017-02-02 14:07:13 -05:00
smoke-test-ingest-disabled Switch from standalone-test to standalone-rest-test 2017-01-05 10:55:47 +01:00
smoke-test-ingest-with-all-dependencies Change Namespace for Stored Script to Only Use Id (#22206) 2017-01-31 13:27:02 -08:00
smoke-test-multinode Switch from standalone-test to standalone-rest-test 2017-01-05 10:55:47 +01:00
smoke-test-plugins Switch from standalone-test to standalone-rest-test 2017-01-05 10:55:47 +01:00
smoke-test-reindex-with-painless Switch from standalone-test to standalone-rest-test 2017-01-05 10:55:47 +01:00
smoke-test-tribe-node Switch from standalone-test to standalone-rest-test 2017-01-05 10:55:47 +01:00
vagrant Add 5.2.0 to static versions used by vagrant 2017-01-31 13:40:56 -08:00