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/04/16 15:45:39 UTC

Send mediator and HTTP 500 errors?

Hello all,

Is there any way I can find if the <send> mediator received a 5XX error from the endpoint?

Thanks
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

Synapse and gzip encoding.

Posted by Abid Khan <Ab...@jeppesen.com>.
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: Send mediator and HTTP 500 errors?

Posted by Hiranya Jayathilaka <hi...@gmail.com>.
Property name: HTTP_SC
Scope: axis2

eg:

<filter source="$axis2:HTTP_SC" regex="500">
 ...
</filter>

Thanks,
Hiranya

On Mon, Apr 16, 2012 at 7:15 PM, Abid Khan <Ab...@jeppesen.com> wrote:

> Hello all,
>
> Is there any way I can find if the <send> mediator received a 5XX error
> from the endpoint?
>
> Thanks
> 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