Skip to content

Commit

Permalink
Issue #5246 - Adding DeflaterPool to GzipHandler.dump
Browse files Browse the repository at this point in the history
Signed-off-by: Joakim Erdfelt <[email protected]>
  • Loading branch information
joakime committed Sep 17, 2020
1 parent 0db3663 commit 6cf6b78
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ public void addIncludedPaths(String... pathspecs)
protected void doStart() throws Exception
{
_deflaterPool = newDeflaterPool(_poolCapacity);
addBean(_deflaterPool);
_vary = (_agentPatterns.size() > 0) ? GzipHttpOutputInterceptor.VARY_ACCEPT_ENCODING_USER_AGENT : GzipHttpOutputInterceptor.VARY_ACCEPT_ENCODING;
super.doStart();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,17 @@ public void doStop()
}
_numObjects.set(0);
}

@Override
public String toString()
{
StringBuilder str = new StringBuilder();
str.append(getClass().getSimpleName());
str.append('@').append(Integer.toHexString(hashCode()));
str.append('{').append(getState());
str.append(",size=").append(_pool == null ? -1 : _pool.size());
str.append(",capacity=").append(_capacity <= 0 ? "UNLIMITED" : _capacity);
str.append('}');
return str.toString();
}
}

0 comments on commit 6cf6b78

Please sign in to comment.