Forum Discussion

vikititor's avatar
vikititor
Contributor
5 years ago
Solved

ServiceV all responses are zipped GZIP, how to send simple content of string?

Hello, no idea why, but each response created by Groovy is put in to GZip. 

My client is unable to read this kind of responses. 

Is there any way, how to disable this zipping?

My code in response is:

context.mockResponse.setResponseContent("some text here - calculated by script")

In ServiceV transaction log response view I can see the RAW response in readable form with this text. But in Headers is "Content-Encoding: gzip".

When I catch this respnse by WireShark.. I can see, that body content is compressed.. 

So is correct, because my server expect this GZIP. But I want to simulate situation, when instead of compressed data I am sending simple RAW data. This is the test of configuration. 

 

So my server send request to MOCK with Encoding: gzip and I need to send non compressed response to him.

Now is compressed.

 

Please tell me, how to turn OFF this feature of ServiceV.

Thank you in advance for your advice.