Fix TomcatHeadersAdapter.clear()

This commit fixes a regression introduced in TomcatHeadersAdapter in
conjunction with gh-33916.

Closes gh-34092
This commit is contained in:
Johnny Lim
2024-12-15 22:58:47 +09:00
committed by Sam Brannen
parent 5cbb5d4d70
commit c8009dc67d
2 changed files with 43 additions and 2 deletions
@@ -163,8 +163,8 @@ class TomcatHeadersAdapter implements MultiValueMap<String, String> {
@Override
public void clear() {
for (int i = 0 ; i < this.headers.size(); i++) {
this.headers.removeHeader(i);
while (this.headers.size() > 0) {
this.headers.removeHeader(0);
}
}