Skip to content

Commit

Permalink
Deprecate large max content length truncation (#29339)
Browse files Browse the repository at this point in the history
Today if a user inputs a value for http.max_content_length that is
greater than the setting can accomodate (Integer.MAX_VALUE), we truncate
this to 100 MB (the default). This commit deprecates this leniency which
will be removed in 7.0.0.
  • Loading branch information
jasontedor authored Apr 3, 2018
1 parent ef6097f commit a44e905
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,9 @@ public Netty4HttpServerTransport(Settings settings, NetworkService networkServic
// validate max content length
if (maxContentLength.getBytes() > Integer.MAX_VALUE) {
logger.warn("maxContentLength[{}] set to high value, resetting it to [100mb]", maxContentLength);
deprecationLogger.deprecated(
"out of bounds max content length value [{}] will no longer be truncated to [100mb], you must enter a valid setting",
maxContentLength.getStringRep());
maxContentLength = new ByteSizeValue(100, ByteSizeUnit.MB);
}
this.maxContentLength = maxContentLength;
Expand Down

0 comments on commit a44e905

Please sign in to comment.