camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryce Ewing <>
Subject HTTP / HTTP4 issue with accept content / content encoding
Date Wed, 21 Jul 2010 09:44:55 GMT


I have had some issues around content encodings, specifically gzipped HTTP
content for an RSS feed.  This is related to:
but also separate.

When using either HTTP or HTTP4 components to try to solve the issues I was
having for RSS feeds I have found these also don't work in all cases.  It
seems rather strange to me how this is currently setup.

Based on the RFC to let a server at the other end know what content
encodings you accept you send a Accept-Encoding header, e.g. if you only
accept gzip you could send "Accept-Encoding: gzip", if you accept gzip and
identity (i.e. not encoded) then you could send "Accept-Encoding gzip,
identity".  Based on the encodings that you tell the server you accept it
can then choose what to send you in response, and it lets you know this by
setting the Content-Encoding response header.

Where things get a little strange for the http and http4 components is that
they seem to be checking for the Content-Encoding header on the request.  I
initially thought that to perform a request for gzip content the
Content-Encoding header should be set prior to calling the http component,
    .setHeader(Exchange.CONTENT_ENCODING, constant("gzip"))
and that maybe it was translated into a Accept-Encoding header.

It seems to me that it would be best to read the response Content-Encoding
header in order to determine whether to decode the stream or not.


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message