You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@synapse.apache.org by Abid Khan <Ab...@jeppesen.com> on 2012/05/01 19:26:45 UTC

Synapse and gzip encoding.

Hello all,

I am sending message to synapse with http header named "Accept-Encoding" with value "gzip, deflate" and synapse seems to be "gzipping" some of the message not all.

Could you please help what is the reason?

Regards,
Abid

Re: Synapse and gzip encoding.

Posted by Hiranya Jayathilaka <hi...@gmail.com>.
On Tue, May 1, 2012 at 10:56 PM, Abid Khan <Ab...@jeppesen.com> wrote:

> Hello all,
>
> I am sending message to synapse with http header named "Accept-Encoding"
> with value "gzip, deflate" and synapse seems to be "gzipping" some of the
> message not all.
>
> Could you please help what is the reason?
>

Setting the Accept-Encoding header to "gzip" doesn't imply that server
should always gzip the responses. It's only a hint to the server that
client is capable of handling gzipped content. It's up to the server to
decide whether to actually gzip the response or not. HTTP spec also
mandates that all HTTP clients be able to handle the identity encoding
(that is no particular encoding) at all times. Therefore the server
(Synapse in this case) can send the responses uncompressed whenever it
wants.

IIRC, the way this is implemented in Synapse is that, if the response from
the backend server is gzipped, Synapse will send a gzipped response back to
the client.

Thanks,
Hiranya


>
> Regards,
> Abid
>



-- 
Hiranya Jayathilaka
Associate Technical Lead;
WSO2 Inc.;  http://wso2.org
E-mail: hiranya@wso2.com;  Mobile: +94 77 633 3491
Blog: http://techfeast-hiranya.blogspot.com