mirror of
https://github.com/gin-gonic/gin.git
synced 2026-07-06 10:21:17 +08:00
Merge 96c0fc516d8698e72be715a35d4ffc352870cd0c into ecb3f7b5e2f3915bf1db240ed5eee572f8dbea36
This commit is contained in:
commit
5622ff9da4
4
gin.go
4
gin.go
@ -689,8 +689,8 @@ func (engine *Engine) handleHTTPRequest(c *Context) {
|
|||||||
httpMethod := c.Request.Method
|
httpMethod := c.Request.Method
|
||||||
rPath := c.Request.URL.Path
|
rPath := c.Request.URL.Path
|
||||||
unescape := false
|
unescape := false
|
||||||
if engine.UseRawPath && len(c.Request.URL.RawPath) > 0 {
|
if engine.UseRawPath {
|
||||||
rPath = c.Request.URL.RawPath
|
rPath = c.Request.URL.EscapedPath()
|
||||||
unescape = engine.UnescapePathValues
|
unescape = engine.UnescapePathValues
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -270,7 +270,7 @@ func LoggerWithConfig(conf LoggerConfig) HandlerFunc {
|
|||||||
return func(c *Context) {
|
return func(c *Context) {
|
||||||
// Start timer
|
// Start timer
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
path := c.Request.URL.Path
|
path := c.Request.URL.EscapedPath()
|
||||||
raw := c.Request.URL.RawQuery
|
raw := c.Request.URL.RawQuery
|
||||||
|
|
||||||
// Process request
|
// Process request
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user