mirror of
https://github.com/denoland/deno.git
synced 2025-07-24 05:35:33 +00:00
perf(http): encode string bodies in op-layer (#12451)
Using serde_v8's StringOrBuffer
This commit is contained in:
parent
c5a35aba82
commit
c27ef0ac7b
5 changed files with 61 additions and 25 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue