Rebased from main: Old CPU / Old docker version compatibility

This commit is contained in:
yusing
2026-01-16 21:27:37 +08:00
parent 2d0058aebc
commit d73272b8e0
61 changed files with 277 additions and 268 deletions

View File

@@ -3,6 +3,7 @@ package captcha
import (
"bytes"
"context"
"encoding/json"
"errors"
"net"
"net/http"
@@ -11,7 +12,6 @@ import (
_ "embed"
"github.com/bytedance/sonic"
gperr "github.com/yusing/goutils/errs"
)
@@ -70,7 +70,7 @@ func (p *HcaptchaProvider) Verify(r *http.Request) error {
Success bool `json:"success"`
Error []string `json:"error-codes"`
}
if err := sonic.ConfigDefault.NewDecoder(resp.Body).Decode(&respData); err != nil {
if err := json.NewDecoder(resp.Body).Decode(&respData); err != nil {
return err
}