RegExReplacer corrupts binary response need to be able to specify filter

Skip to first unread message

Andy Arismendi

Jan 26, 2023, 10:10:33 PM1/26/23
to membrane-monitor
Hi, I ran into an issue where the response content type is application/zip and wasn't excluded due to the limited exclusion in the code linked below which caused corruption. It would be great to be able to specify a content type list to only apply the regex to e.g. text/html, application/json etc... in proxies.xml as an attribute for RegExReplacer.

Tobias Polley

Jul 18, 2023, 5:52:41 AM7/18/23
to membrane-monitor
Hi Andy,

sorry for the late reply. In general, you can put any interceptor within an <if>:

<if test="exc.response.header.getFirstValue('Content-Type') != 'application/zip'">

But, of course, this is far from a good solution, as the content-type might also be "application/octet-stream", or have parameters, or be missing, or ...

It might still work in your case, though.

Reply all
Reply to author
0 new messages