Hi All,
We have upgraded our camel-core library from
2.14.0 to 2.18.0
and Jetty-server from 8.1.15 to 9.2.28.
Our downstream call our API with compressed XML content, after this upgrade request decompression is not working and XML unmarshaller fails as it can’t parse binary content.
We are facing this issue came only after this upgrade, before this upgrade decompression was happening automatically.
I had tried with Jetty-server 9.4.14 as well but then request started failing with Exception “501, method not implemented”, after analysis came to know content-encoding:gzip
is not supported and it throw exception if request has header content-encoding:gzip.
I tried below approach after studying on google but with no success.
public
class ConfigServerJettyHttpComponent
extends JettyHttpComponent9{
private
static
final Logger
log = LoggerFactory.getLogger(ConfigServerJettyHttpComponent.class);
protected
Server createServer() {
GzipHandler
gzipHandler =
new GzipHandler();
gzipHandler.addIncludedMethods("GET","POST","PUT");
gzipHandler.setBufferSize(2048);
gzipHandler.setServer(server);
server.setHandler(gzipHandler);
return
server;
}
Any help would be appreciated.
Regards,
Samrat