From c3e42f2febe659849ece3724ff50164dfd041556 Mon Sep 17 00:00:00 2001 From: wjqserver <114663932+WJQSERVER@users.noreply.github.com> Date: Sun, 30 Mar 2025 17:22:34 +0800 Subject: [PATCH 1/3] [fix] remove reWriteEncodeHeader --- proxy/chunkreq.go | 2 -- proxy/gitreq.go | 6 ++++-- proxy/reqheader.go | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/proxy/chunkreq.go b/proxy/chunkreq.go index d135d17..d0aaaba 100644 --- a/proxy/chunkreq.go +++ b/proxy/chunkreq.go @@ -23,7 +23,6 @@ func ChunkedProxyRequest(c *gin.Context, u string, cfg *config.Config, matcher s } setRequestHeaders(c, headReq) removeWSHeader(headReq) // 删除Conection Upgrade头, 避免与HTTP/2冲突(检查是否存在Upgrade头) - reWriteEncodeHeader(headReq) AuthPassThrough(c, cfg, headReq) headResp, err := client.Do(headReq) @@ -65,7 +64,6 @@ func ChunkedProxyRequest(c *gin.Context, u string, cfg *config.Config, matcher s } setRequestHeaders(c, req) removeWSHeader(req) // 删除Conection Upgrade头, 避免与HTTP/2冲突(检查是否存在Upgrade头) - reWriteEncodeHeader(req) AuthPassThrough(c, cfg, req) resp, err := client.Do(req) diff --git a/proxy/gitreq.go b/proxy/gitreq.go index 78f6b32..69c0202 100644 --- a/proxy/gitreq.go +++ b/proxy/gitreq.go @@ -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) diff --git a/proxy/reqheader.go b/proxy/reqheader.go index ce62b91..777235c 100644 --- a/proxy/reqheader.go +++ b/proxy/reqheader.go @@ -2,7 +2,6 @@ package proxy import ( "net/http" - "strings" "github.com/gin-gonic/gin" ) @@ -21,8 +20,8 @@ func removeWSHeader(req *http.Request) { req.Header.Del("Connection") } +/* func reWriteEncodeHeader(req *http.Request) { - if isGzipAccepted(req.Header) { req.Header.Set("Content-Encoding", "gzip") req.Header.Set("Accept-Encoding", "gzip") @@ -48,3 +47,4 @@ func isGzipAccepted(header http.Header) bool { } return false } +*/ From 3364b1d88555b23918b8c3435109fa94317d254e Mon Sep 17 00:00:00 2001 From: wjqserver <114663932+WJQSERVER@users.noreply.github.com> Date: Sun, 30 Mar 2025 17:27:26 +0800 Subject: [PATCH 2/3] 25w25a --- CHANGELOG.md | 10 ++++++++++ DEV-VERSION | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ccf6f8..8bb2aa4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # 更新日志 +25w25a - 2025-03-30 +--- +- PRE-RELEASE: 此版本是v2.6.3的预发布版本,请勿在生产环境中使用; +- FIX: 修正一些`git clone`行为异常 + +e3.0.7 - 2025-03-29 +--- +- CHANGE: 将`cfg`flag改为`c`以符合`POSIX`规范 +- CHANGE: 为`smart-git`添加`no-cache`标头 + 2.6.2 - 2025-03-29 --- - BACKPORT: 反向移植前端资源加载改进 diff --git a/DEV-VERSION b/DEV-VERSION index 75fd99b..d251eb0 100644 --- a/DEV-VERSION +++ b/DEV-VERSION @@ -1 +1 @@ -25w24a \ No newline at end of file +25w25a \ No newline at end of file From 88519cc9b3f47934f52e0cd8b6e1ce0d5c692c8f Mon Sep 17 00:00:00 2001 From: wjqserver <114663932+WJQSERVER@users.noreply.github.com> Date: Sun, 30 Mar 2025 17:37:38 +0800 Subject: [PATCH 3/3] 2.6.3 --- CHANGELOG.md | 4 ++++ VERSION | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8bb2aa4..9cc911a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # 更新日志 +2.6.3 - 2025-03-30 +--- +- FIX: 修正一些`git clone`行为异常 + 25w25a - 2025-03-30 --- - PRE-RELEASE: 此版本是v2.6.3的预发布版本,请勿在生产环境中使用; diff --git a/VERSION b/VERSION index d5724cd..bd4053b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.6.2 \ No newline at end of file +2.6.3 \ No newline at end of file