Improve debug logging of gzip inflation

Signed-off-by: Greg Wilkins <gregw@webtide.com>
This commit is contained in:
Greg Wilkins 2019-10-09 11:51:13 +11:00
parent 8087e29211
commit 31a0180133
1 changed files with 9 additions and 0 deletions

View File

@ -658,6 +658,9 @@ public class GzipHandler extends HandlerWrapper implements GzipFactory
if (inflate)
{
if (LOG.isDebugEnabled())
LOG.debug("{} inflate {}", this, request);
baseRequest.getHttpInput().addInterceptor(new GzipHttpInputInterceptor(baseRequest.getHttpChannel().getByteBufferPool(), _inflateBufferSize));
for (ListIterator<HttpField> i = baseRequest.getHttpFields().listIterator(); i.hasNext(); )
@ -1024,4 +1027,10 @@ public class GzipHandler extends HandlerWrapper implements GzipFactory
{
return new DeflaterPool(capacity, getCompressionLevel(), true);
}
@Override
public String toString()
{
return String.format("%s@%x{%s,min=%s,inflate=%s}", getClass().getSimpleName(), hashCode(), getState(), _minGzipSize, _inflateBufferSize);
}
}