diff options
author | Aaron O'Mullan <aaron.omullan@gmail.com> | 2021-10-26 22:00:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-26 22:00:01 +0200 |
commit | c27ef0ac7b5fd7aba4de24292e80387c8243896e (patch) | |
tree | cb2ce5631491245d12777e62d0696580b080bef8 /ext/fetch/26_fetch.js | |
parent | c5a35aba82f5cb24f0ba478875e492dd9ae0524d (diff) |
perf(http): encode string bodies in op-layer (#12451)
Using serde_v8's StringOrBuffer
Diffstat (limited to 'ext/fetch/26_fetch.js')
-rw-r--r-- | ext/fetch/26_fetch.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/fetch/26_fetch.js b/ext/fetch/26_fetch.js index fcfa75318..b9e2b1e6b 100644 --- a/ext/fetch/26_fetch.js +++ b/ext/fetch/26_fetch.js @@ -214,6 +214,8 @@ } else { req.body.streamOrStatic.consumed = true; reqBody = req.body.streamOrStatic.body; + // TODO(@AaronO): plumb support for StringOrBuffer all the way + reqBody = typeof reqBody === "string" ? core.encode(reqBody) : reqBody; } } |