OpenSearch/qa/smoke-test-http/src/test/java/org/elasticsearch/http
Jason Tedor 51d53791fe Remove lenient URL parameter parsing
Today when parsing a request, Elasticsearch silently ignores incorrect
(including parameters with typos) or unused parameters. This is bad as
it leads to requests having unintended behavior (e.g., if a user hits
the _analyze API and misspell the "tokenizer" then Elasticsearch will
just use the standard analyzer, completely against intentions).

This commit removes lenient URL parameter parsing. The strategy is
simple: when a request is handled and a parameter is touched, we mark it
as such. Before the request is actually executed, we check to ensure
that all parameters have been consumed. If there are remaining
parameters yet to be consumed, we fail the request with a list of the
unconsumed parameters. An exception has to be made for parameters that
format the response (as opposed to controlling the request); for this
case, handlers are able to provide a list of parameters that should be
excluded from tripping the unconsumed parameters check because those
parameters will be used in formatting the response.

Additionally, some inconsistencies between the parameters in the code
and in the docs are corrected.

Relates #20722
2016-10-04 12:45:29 -04:00
..
ContextAndHeaderTransportIT.java restore throws IOException clause on all performRequest sync methods 2016-07-19 15:18:05 +02:00
CorsNotSetIT.java restore throws IOException clause on all performRequest sync methods 2016-07-19 15:18:05 +02:00
CorsRegexIT.java restore throws IOException clause on all performRequest sync methods 2016-07-19 15:18:05 +02:00
DeprecationHttpIT.java restore throws IOException clause on all performRequest sync methods 2016-07-19 15:18:05 +02:00
DetailedErrorsDisabledIT.java restore throws IOException clause on all performRequest sync methods 2016-07-19 15:18:05 +02:00
DetailedErrorsEnabledIT.java restore throws IOException clause on all performRequest sync methods 2016-07-19 15:18:05 +02:00
HttpCompressionIT.java Introduce Netty 4 2016-07-22 22:26:35 -04:00
HttpSmokeTestCase.java Remove ESIntegTestCase#pluginList 2016-08-11 15:44:02 -04:00
ResponseHeaderPluginIT.java restore throws IOException clause on all performRequest sync methods 2016-07-19 15:18:05 +02:00
TestDeprecatedQueryBuilder.java Migrate query registration from push to pull 2016-07-20 12:33:51 -04:00
TestDeprecationHeaderRestAction.java Remove lenient URL parameter parsing 2016-10-04 12:45:29 -04:00
TestDeprecationPlugin.java Migrate query registration from push to pull 2016-07-20 12:33:51 -04:00
TestResponseHeaderPlugin.java Fix remaining tests that either need access to the netty module or require explict configuration 2016-07-12 16:29:57 +02:00
TestResponseHeaderRestAction.java Remove lenient URL parameter parsing 2016-10-04 12:45:29 -04:00