[fix] remove reWriteEncodeHeader

This commit is contained in:
wjqserver 2025-03-30 17:22:34 +08:00
parent 8adc9c87f9
commit c3e42f2feb
3 changed files with 6 additions and 6 deletions

View file

@ -50,7 +50,6 @@ func GitReq(c *gin.Context, u string, cfg *config.Config, mode string, runMode s
}
setRequestHeaders(c, req)
removeWSHeader(req)
reWriteEncodeHeader(req)
AuthPassThrough(c, cfg, req)
resp, err = gitclient.Do(req)
@ -66,7 +65,6 @@ func GitReq(c *gin.Context, u string, cfg *config.Config, mode string, runMode s
}
setRequestHeaders(c, req)
removeWSHeader(req)
reWriteEncodeHeader(req)
AuthPassThrough(c, cfg, req)
resp, err = client.Do(req)
@ -82,6 +80,10 @@ func GitReq(c *gin.Context, u string, cfg *config.Config, mode string, runMode s
}
}(resp.Body)
// 记录返回结果信息
logDump("Resp Header: %v", resp.Header)
logDump("Resp Status: %v", resp.StatusCode)
contentLength := resp.Header.Get("Content-Length")
if contentLength != "" {
size, err := strconv.Atoi(contentLength)