fix: 刷新改为后台执行并在部分失败时保留已有数据
This commit is contained in:
@@ -501,7 +501,7 @@ func parseBody(buf []byte, priv *rsa.PrivateKey) (*Result, error) {
|
||||
if json.Unmarshal(raw, &s) == nil && s != "" {
|
||||
plain, err := decryptLong(priv, s)
|
||||
if err != nil {
|
||||
return nil, errors.New("无法解密网站响应")
|
||||
return nil, errDecrypt
|
||||
}
|
||||
decoded, err := decodeURIComponent(plain)
|
||||
if err != nil {
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
var errDecrypt = errors.New("无法用当前密钥解密")
|
||||
var errDecrypt = errors.New("无法解密网站响应")
|
||||
|
||||
func encryptLong(pub *rsa.PublicKey, plain string) (string, error) {
|
||||
if pub == nil {
|
||||
|
||||
Reference in New Issue
Block a user