Commit ad8f443c authored by Medicean's avatar Medicean

(Fix:Backend) 修复 multipart 发包方式下, 编码器中 data 内容不为字符串时异常

parent c6847f44
......@@ -2,6 +2,26 @@
> 有空会补补BUG、添添新功能。
> 同时也欢迎大家的参与!感谢各位朋友的支持! .TAT.
## `2.1.13`
### 后端模块
* 修复 multipart 发包方式下, 编码器中 data 内容不为字符串时异常
eg:
```
'use strict';
module.exports = (pwd, data) => {
data['test'] = 123; // 这里会引发异常
data[pwd] = data['_'];
delete data['_'];
return data;
}
```
## 2021/05/15 `v(2.1.12)`
### 核心
......
......@@ -192,7 +192,7 @@ class Request {
_request.send = _request.field;
for (var key in _postData) {
if (_postData.hasOwnProperty(key)) {
let _tmp = (_postData[key]).replace(/asunescape\((.+?)\)/g, function ($, $1) {
let _tmp = String(_postData[key]).replace(/asunescape\((.+?)\)/g, function ($, $1) {
return unescape($1)
});
_postarr[key] = _tmp;
......@@ -362,7 +362,7 @@ class Request {
_request.send = _request.field;
for (var key in _postData) {
if (_postData.hasOwnProperty(key)) {
let _tmp = (_postData[key]).replace(/asunescape\((.+?)\)/g, function ($, $1) {
let _tmp = String(_postData[key]).replace(/asunescape\((.+?)\)/g, function ($, $1) {
return unescape($1)
});
_postarr[key] = _tmp;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment