h3 1.6.3 → 1.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -1
- package/dist/index.mjs +3 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -278,7 +278,9 @@ function readRawBody(event, encoding = "utf8") {
|
|
|
278
278
|
assertMethod(event, PayloadMethods$1);
|
|
279
279
|
const _rawBody = event.node.req[RawBodySymbol] || event.node.req.body;
|
|
280
280
|
if (_rawBody) {
|
|
281
|
-
const promise2 = Promise.resolve(
|
|
281
|
+
const promise2 = Promise.resolve(
|
|
282
|
+
Buffer.isBuffer(_rawBody) ? _rawBody : Buffer.from(_rawBody)
|
|
283
|
+
);
|
|
282
284
|
return encoding ? promise2.then((buff) => buff.toString(encoding)) : promise2;
|
|
283
285
|
}
|
|
284
286
|
if (!Number.parseInt(event.node.req.headers["content-length"] || "")) {
|
package/dist/index.mjs
CHANGED
|
@@ -276,7 +276,9 @@ function readRawBody(event, encoding = "utf8") {
|
|
|
276
276
|
assertMethod(event, PayloadMethods$1);
|
|
277
277
|
const _rawBody = event.node.req[RawBodySymbol] || event.node.req.body;
|
|
278
278
|
if (_rawBody) {
|
|
279
|
-
const promise2 = Promise.resolve(
|
|
279
|
+
const promise2 = Promise.resolve(
|
|
280
|
+
Buffer.isBuffer(_rawBody) ? _rawBody : Buffer.from(_rawBody)
|
|
281
|
+
);
|
|
280
282
|
return encoding ? promise2.then((buff) => buff.toString(encoding)) : promise2;
|
|
281
283
|
}
|
|
282
284
|
if (!Number.parseInt(event.node.req.headers["content-length"] || "")) {
|