Response oldResponse = requestCycle.setResponse(encodingHeaderResponse);
try {
encodingHeaderResponse.reset();
IHeaderRenderStrategy strategy = AbstractHeaderRenderStrategy.get();
strategy.renderHeader(header, null, component);
} finally {
// revert to old response
requestCycle.setResponse(oldResponse);
}