mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Restore TomcatHeadersAdapter.clear() behavior
This commit restores the original behavior of the clear() method in TomcatHeadersAdapter by delegating to org.apache.tomcat.util.http.MimeHeaders.recycle(), which aligns with the memory efficiency goals documented in the class-level Javadoc for MimeHeaders. See gh-33916 Closes gh-34092
This commit is contained in:
+1
-3
@@ -163,9 +163,7 @@ class TomcatHeadersAdapter implements MultiValueMap<String, String> {
|
||||
|
||||
@Override
|
||||
public void clear() {
|
||||
while (this.headers.size() > 0) {
|
||||
this.headers.removeHeader(0);
|
||||
}
|
||||
this.headers.recycle();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user