OpenSearch/server/src
Jake Landis f8636e58f9
Support content type `application/x-ndjson` in DeprecationRestHandler (#36025)
org.elasticsearch.rest.RestController#hasContentType checks to see if the
RestHandler supports the `application/x-ndjson` Content-Type. DeprecationRestHandler
is a wrapper around the real RestHandler, and prior to this change
would always return `false` due to the interface's default supportsContentStream().
This prevents API's that use multi-line JSON from properly being deprecated
resulting in an HTTP 406 error.

This change ensures that the DeprecationRestHandler honors the
supportsContentStream() of the wrapped RestHandler.

Relates to #35958
2018-11-29 11:45:45 -06:00
..
main Support content type `application/x-ndjson` in DeprecationRestHandler (#36025) 2018-11-29 11:45:45 -06:00
test Support content type `application/x-ndjson` in DeprecationRestHandler (#36025) 2018-11-29 11:45:45 -06:00