From 4afbf3a9528b3afe49cfbdcc0204099b6ea56575 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Tue, 31 Oct 2023 11:18:26 +0100 Subject: [PATCH] feat(libs): support wildcards in request header values --- contracts/libs/WitnetEncodingLib.sol | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contracts/libs/WitnetEncodingLib.sol b/contracts/libs/WitnetEncodingLib.sol index 1f358127..15618f9f 100644 --- a/contracts/libs/WitnetEncodingLib.sol +++ b/contracts/libs/WitnetEncodingLib.sol @@ -305,6 +305,9 @@ library WitnetEncodingLib { self.url = WitnetBuffer.replace(self.url, args); self.body = WitnetBuffer.replace(self.body, args); self.script = replaceCborStringsFromBytes(self.script, args); + for (uint _ix = 0 ; _ix < self.headers.length; _ix ++) { + self.headers[_ix][1] = WitnetBuffer.replace(self.headers[_ix][1], args); + } } function validate(