Hello!
On Fri, Aug 23, 2013 at 2:32 PM, rahul007true wrote:
[...]
> \u0003ÿ³N\u0002\u0000\u0000","header":{"Content-Length":436,"Set-Cookie":"definitiad_campaign_3338=3;
> Path=\/","Vary":"Cookie","Content-Encoding":"gzip","Content-Type":"application\/json","X-Frame-Options":"SAMEORIGIN"},"truncated":false}
>
Note the "Content-Encoding":"gzip" header above. And yes, your
subrequest response is gzip compressed.
> The "body" response looks like some encoded response. I am not able to
> process this response. In apache response comes in proper format.
>
> Please help me process this response. It might be the compression issue. If
> thats the issue then how to decompress it.
>
You can either de-compress the response body yourself in Lua, or just
disable the backend gzip compression by adding a configuration
directive like below to your location configured by ngx_proxy
(assuming you're using ngx_proxy because you didn't mention it):
proxy_set_header Accept-Encoding "";
See the following GitHub ticket for more details on these two approaches:
https://github.com/chaoslawful/lua-nginx-module/issues/12
Best regards,
-agentzh