-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Closed
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.ProposalProposal-Acceptedrelease-blocker
Milestone
Description
Over in #25192 (comment), @AGWA makes the suggestion to add to net/http a standard Handler wrapper to allow semicolons for people who want to opt into that. The function would be something like:
func AllowQuerySemicolons(h http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.URL.RawQuery != "" {
r2 := new(http.Request)
*r2 = *r
r2.URL = new(url.URL)
*r2.URL = *r.URL
r2.URL.RawQuery = strings.ReplaceAll(r.URL.RawQuery, ";", "&")
h.ServeHTTP(w, r2)
} else {
h.ServeHTTP(w, r)
}
})
}
It seems like a nice way to reduce the pain of the semicolon change itself in #25192. We should consider adding it for Go 1.17 (even though we are in the freeze).
ainar-g, AGWA, antichris, beoran and jfesler
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.ProposalProposal-Acceptedrelease-blocker