Yes it works!!

Also I had to set the "Content encoding" in the Sampler to "ISO-8859-1".
Thank you.


Sergio


Il 09/02/2020 12:50, Felix Schumacher ha scritto:
Am 08.02.20 um 12:47 schrieb Sergio Boso:
Hi everybody,

I'm writing a Load test that send Time Stamping Requests to a Time
Stamping Autority.

This is a standard protocol, described in rfc3161. This require a POST
execution, sending a small ASN1 object, that is binary.

Now, I have written the groovy part that set up the ASN1 object, and
that creates the *bytes[] array*, but I cannot copy to a variable,
because the casting to a string *modifies* the content. However I
cannot find any other way to pass this content.
Have you tried to convert the bytes array to a string using an 8-bit
encoding like iso-8859-1?

  String request = new String(asnBytes,
java.nio.charsets.StandardCharsets.ISO_8859_1)

Another possibility would be to convert it to base64

  String b64Request = Base64.mimeEncoder.encodeToString(x)

and send that value with a content-transfer-encoding header set to "base64".

Felix

Given the amount of traffic I have to generate, writing to a file and
then attach it is not a viable solution.

Is there any other way to work around this issue?

Thank you in advance!




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



--

Ing. Sergio Boso

Mail:
Cell:
Web:
Linkedin:
PEC:
Skype:

        

[email protected] <mailto:[email protected]>
+39 335 7243 445
www.bosoconsulting.it <http://www.bosoconsulting.it>
http://it.linkedin.com/in/sergioboso 
<http://www.linkedin.com/pub/sergio-boso/1/29b/255>
[email protected] <mailto:[email protected]>
sbos61




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to