Hi,
I checked the request which "Content-Encooding" is "gzip, deflate" by using the DevTest10.1.0.
I did not check the recorder level, but the playing back level I found these:
When the "Content-Encooding" is gzip, then the virtual service can extract gzip and can get the argumrnts from the extracted SOAP request.
However, when the "Content-Encooding" is deflate, the request data is not modified from the virtual service and treated as the binary data.
To extract the deflated request, you need to define the Scriptable Data Protocol filter(for "Process Request") in the "Virtual HTTPS Listner" step and write script to handle the deflated request before the "Web Service(SOAP)" Data Protocol filter.
Here is the sample script which I tested in my environment(DevTest 10.1.0).
---------------------- Script Start ----------------------------------
%beanshell%
import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.zip.GZIPOutputStream;
import java.util.zip.Deflater;
import java.util.zip.Inflater;
if (lisa_vse_request.isBinary()) {
String out;
Inflater decompresser = new Inflater();
byte[] b = lisa_vse_request.getBodyBytes();
InputStream bis = new ByteArrayInputStream(b);
byte[] inpBuf = new byte[1024];
byte[] outBuf = new byte[1024];
int rd;
rd = 1;
do{
rd = bis.read(inpBuf);
if (rd > 0) {
decompresser.setInput(inpBuf, 0, rd);
}
while (!decompresser.finished()) {
int siz = decompresser.inflate(outBuf);
if (siz > 0) {
out = new String(outBuf, 0, siz, "UTF-8");
} else {
break;
}
}
} while (rd > 0);
bis.close();
decompresser.end();
lisa_vse_request.setBinary(false);
lisa_vse_request.setBodyText(out);
}
---------------------- Script End ----------------------------------
If the "Content-Encooding" is gzip, the value of lisa_vse_request.isBinary() is "false", so this script is for only deflated contents.
I tested this script only by using the DevTest 10.1.0, but I hope this script will help you.
Additionally, even if I used the DevTest 10.1.0, but the deflated contents still have problems. So I suggest to create an idea to this community as a feature request.
Cheers,