Fix git empty check and HEAD request (#33690)

This commit is contained in:
wxiaoguang authored and GitHub committed 2025-02-24 02:11:29 +00:00
1 parent 8ae46d9684
commit 56a0a9c750
4 files changed
+36 -16

No files matched your search

+1 -1
View File
@@ -78,7 +78,7 @@ func httpBase(ctx *context.Context) *serviceHandler {
strings.HasSuffix(ctx.Req.URL.Path, "git-upload-archive") {
isPull = true
} else {
isPull = ctx.Req.Method == "GET"
isPull = ctx.Req.Method == "HEAD" || ctx.Req.Method == "GET"
}
var accessMode perm.AccessMode