Modify: parameters in headers should be URIEncoded

This commit is contained in:
HFO4
2019-11-25 21:12:28 +08:00
parent 28df5ca833
commit 451bdb4ee1
6 changed files with 53 additions and 6 deletions

View File

@@ -38,7 +38,6 @@ type PolicyOption struct {
OPPassword string `json:"op_pwd"`
FileType []string `json:"file_type"`
MimeType string `json:"mimetype"`
SpeedLimit int `json:"speed_limit"`
RangeTransferEnabled bool `json:"range_transfer_enabled"`
}
@@ -53,6 +52,9 @@ func GetPolicyByID(ID interface{}) (Policy, error) {
func (policy *Policy) AfterFind() (err error) {
// 解析上传策略设置到OptionsSerialized
err = json.Unmarshal([]byte(policy.Options), &policy.OptionsSerialized)
if policy.OptionsSerialized.FileType == nil {
policy.OptionsSerialized.FileType = []string{}
}
return err
}