Skip to content

Commit 6887c27

Browse files
committed
Decode form data in the request body
1 parent 9255d26 commit 6887c27

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nasriya/hypercloud",
3-
"version": "1.2.6",
3+
"version": "1.2.7",
44
"description": "Nasriya HyperCloud is a lightweight Node.js HTTP2 framework.",
55
"main": "./dist/cjs/hypercloud.js",
66
"module": "./dist/esm/hypercloud.js",

src/services/handler/assets/requestBody.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ class RequestBody {
1616
/**
1717
* Get the value
1818
* @param name
19-
* @returns {any}
2019
*/
2120
get(name: string) {
2221
return this.#_data[name]
@@ -33,7 +32,7 @@ class RequestBody {
3332
from(value: any) {
3433
if (typeof value === 'object' && Object.keys(value).length > 0) {
3534
for (const prop in value) {
36-
this.set(prop, value[prop])
35+
this.set(prop, decodeURIComponent(value[prop]));
3736
}
3837
}
3938

0 commit comments

Comments
 (0)