Issue #897
If a request is not handled within the scope of the GzipHandler, the gzip interceptor is removed so it cannot be used by any subsequent handlers. If the request is handled, it is left in place to be used by any async handling.
This commit is contained in:
parent
00fe5d032e
commit
0c6c11d79d
|
@ -454,12 +454,22 @@ public class GzipHandler extends HandlerWrapper implements GzipFactory
|
|||
}
|
||||
}
|
||||
|
||||
HttpOutput.Interceptor orig_interceptor = out.getInterceptor();
|
||||
try
|
||||
{
|
||||
// install interceptor and handle
|
||||
out.setInterceptor(new GzipHttpOutputInterceptor(this,getVaryField(),baseRequest.getHttpChannel(),out.getInterceptor(),isSyncFlush()));
|
||||
out.setInterceptor(new GzipHttpOutputInterceptor(this,getVaryField(),baseRequest.getHttpChannel(),orig_interceptor,isSyncFlush()));
|
||||
|
||||
if (_handler!=null)
|
||||
_handler.handle(target,baseRequest, request, response);
|
||||
}
|
||||
finally
|
||||
{
|
||||
// reset interceptor if request not handled
|
||||
if (!baseRequest.isHandled() && !baseRequest.isAsyncStarted())
|
||||
out.setInterceptor(orig_interceptor);
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue