Merge 6c7a318468ce708b91c1afbf4a32e493d65fab22 into e88fc8927a52b74f55bec0351604a56ac0aa1c51

This commit is contained in:
Jim Chen 2025-11-21 10:22:06 +01:00 committed by GitHub
commit 69de1a7fe7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

4
gin.go
View File

@ -689,8 +689,8 @@ func (engine *Engine) handleHTTPRequest(c *Context) {
httpMethod := c.Request.Method
rPath := c.Request.URL.Path
unescape := false
if engine.UseRawPath && len(c.Request.URL.RawPath) > 0 {
rPath = c.Request.URL.RawPath
if engine.UseRawPath {
rPath = c.Request.URL.EscapedPath()
unescape = engine.UnescapePathValues
}

View File

@ -270,7 +270,7 @@ func LoggerWithConfig(conf LoggerConfig) HandlerFunc {
return func(c *Context) {
// Start timer
start := time.Now()
path := c.Request.URL.Path
path := c.Request.URL.EscapedPath()
raw := c.Request.URL.RawQuery
// Process request