refactor(pprof): use explicit mux instead of DefaultServeMux#36276
Merged
wxiaoguang merged 3 commits intogo-gitea:mainfrom Jan 2, 2026
Merged
refactor(pprof): use explicit mux instead of DefaultServeMux#36276wxiaoguang merged 3 commits intogo-gitea:mainfrom
wxiaoguang merged 3 commits intogo-gitea:mainfrom
Conversation
- Replace blank import of net/http/pprof with explicit import - Create dedicated http.ServeMux for pprof server - Register pprof handlers explicitly - Improves isolation and maintainability Signed-off-by: luojiyin <luojiyin@hotmail.com>
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
wxiaoguang
approved these changes
Jan 2, 2026
lunny
approved these changes
Jan 2, 2026
zjjhot
added a commit
to zjjhot/gitea
that referenced
this pull request
Jan 5, 2026
* giteaofficial/main: Move assign project when creating pull request to the same database transaction (go-gitea#36244) [skip ci] Updated translations via Crowdin Fix stats bug when syncing release (go-gitea#36285) Fix link/origin referrer and login redirect (go-gitea#36279) Always honor user's choice for "delete branch after merge" (go-gitea#36281) refactor(pprof): use explicit mux instead of DefaultServeMux (go-gitea#36276) improve the compare page (go-gitea#36261) mailer: pass request context to generateAdditionalHeadersForIssue (go-gitea#36274) feat(debian): use explicit, stronger defaults for newly generated repo signing keys (go-gitea#36236) Make "commit statuses" API accept slashes in "ref" (go-gitea#36264) # Conflicts: # templates/base/footer_content.tmpl # templates/base/head_navbar.tmpl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
net/http/pprofwith explicit importhttp.ServeMuxfor pprof serverWhy
DefaultServeMuxDefaultServeMuxChanges
cmd/web.go: Replacehttp.DefaultServeMuxwith explicithttp.NewServeMux()