Skip to content

Commit 57bf8a1

Browse files
committed
fix(repeater): decode base64 bodies before scripts (#553)
closes #552
1 parent 06fad30 commit 57bf8a1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/RequestExecutor/HttpRequestExecutor.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,12 @@ export class HttpRequestExecutor implements RequestExecutor {
359359

360360
const result = await vm.exec<ScriptEntrypoint>(
361361
this.DEFAULT_SCRIPT_ENTRYPOINT,
362-
script.toJSON()
362+
{
363+
...script.toJSON(),
364+
body: script.encoding
365+
? iconv.encode(script.body, script.encoding).toString()
366+
: script.body
367+
}
363368
);
364369

365370
return new Request(result);

0 commit comments

Comments
 (0)