Limit usage of Tomcat's Connector#setProperty to a minimum #160
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains a couple of general fixes / improvements, which I developed while integrating Tomcat 10 (#144 / #159), that are also useful to existing Tomcat servlet containers prior to version ten.
The changes common motive consists of limiting usage of the stringly-typed method
Connector#setProperty(String name, String value)
:SSLHostConfig
. This gets rid of properties which are already deprecated in Tomcat 9, and cease to exist in Tomcat 10.httpsIdleTimeout
, the caller failed to match the signature ofsetProperty
, because the second argument was of type Integer, causing a runtime error that prevented using that feature.maxPostSize
, that call ofsetProperty
never worked, because the target object has no property with that name. Also, the config value of '0' is wrong for the stated purpose. According to Tomcat 8/8.5/9/10 documentation, a value below zero configures unlimited post size.setProperty
should never fail silently. We should assert on the return value ofsetProperty
, which is a bool indicating whether that call succeeded (that the caller has met requirements for property name and data type).