Repository navigation
fix(middleware): preserve query strings in profiler redirects - #1202
Open
sergioperezcheco wants to merge 1 commit into
Open
sergioperezcheco wants to merge 1 commit into
sergioperezcheco wants to merge 1 commit into
Conversation
Implemented and tested with AI assistance through Hermes Agent. Signed-off-by: sergioperezcheco <checo520@outlook.com>
This branch has not been deployed
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.
Profilerappended redirect suffixes toRequestURI, so/debug/pprof?debug=1redirected to/debug/pprof?debug=1/instead of/debug/pprof/?debug=1. Following that redirect never reached the pprof index.This appends the suffix to a copied URL's path and escaped path, preserving the raw query and full mount prefix. The root redirect also normalizes
/debug/to/debug/pprof/rather than the previous double-slash path. Regression tests use real HTTP requests for root and pprof entry points, nested and escaped mount prefixes, and queries with repeated keys; they follow each redirect to the real pprof index.The regression fails against the original implementation. The full module race suite, vet, goimports and incremental staticcheck pass locally on Go 1.26.4/macOS arm64. Other Go versions and the Linux/Windows CI matrix have not been run locally.
Implemented and verified with AI assistance through Hermes Agent.