Merge branch 'dev' into main

This commit is contained in:
三千 2025-02-09 23:47:09 +08:00 committed by GitHub
commit 5480c83edd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 296 additions and 44 deletions

View file

@ -39,7 +39,7 @@ func GitReq(c *gin.Context, u string, cfg *config.Config, mode string, runMode s
// 发送HEAD请求, 预获取Content-Length
headReq, err := http.NewRequest("HEAD", u, nil)
if err != nil {
HandleError(c, fmt.Sprintf("创建HEAD请求失败: %v", err))
HandleError(c, fmt.Sprintf("Failed to create request: %v", err))
return
}
setRequestHeaders(c, headReq)
@ -81,7 +81,7 @@ func GitReq(c *gin.Context, u string, cfg *config.Config, mode string, runMode s
// 创建请求
req, err := http.NewRequest(method, u, bodyReader)
if err != nil {
HandleError(c, fmt.Sprintf("创建请求失败: %v", err))
HandleError(c, fmt.Sprintf("Failed to create request: %v", err))
return
}
setRequestHeaders(c, req)