I am wondering: is there a way to access the current request in a WriterIterceptor on the container side?
What I want to do is to gzip-encode the output stream but only if the client said 'Accept-Encoding: gzip'.
Thus I'd like to be able to do sth like
@Override
public void aroundWriteTo(WriterInterceptorContext wCtx) ... {
if( wCtx.getRequest().getHeader('Accept-Encoding') ... 'gzip') {
... hook in gzip output stream
}
}
What do you think - or what am I missing?
Jan