Upgrade to Tomcat 11.0

This commit upgrades the baseline to Tomcat 11.0 and adapts to the
following behavior changes in Tomcat:

* the MimeHeaders#clear method has been removed
* expired cookies do not set "Max-Age=0" anymore
* responses to HEAD requests do not write the "Content-Length" header
  anymore.

Closes gh-33916
This commit is contained in:
Brian Clozel
2024-11-19 18:07:22 +01:00
parent c28cbfd582
commit 4b3e192ca1
4 changed files with 9 additions and 9 deletions

View File

@@ -161,10 +161,11 @@ class TomcatHeadersAdapter implements MultiValueMap<String, String> {
map.forEach(this::put);
}
@SuppressWarnings("deprecation") // on Tomcat 10.1.16+
@Override
public void clear() {
this.headers.clear();
for (int i = 0 ; i < this.headers.size(); i++) {
this.headers.removeHeader(i);
}
}
@Override