mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-16 13:22:09 +08:00
Extract variables in handleHTTPRequest
This commit is contained in:
parent
dc9cff732e
commit
f033d8b5ea
7
gin.go
7
gin.go
@ -591,10 +591,11 @@ func (engine *Engine) HandleContext(c *Context) {
|
||||
|
||||
func (engine *Engine) handleHTTPRequest(c *Context) {
|
||||
httpMethod := c.Request.Method
|
||||
rPath := c.Request.URL.Path
|
||||
requestURL := c.Request.URL
|
||||
rPath := requestURL.Path
|
||||
unescape := false
|
||||
if engine.UseRawPath && len(c.Request.URL.RawPath) > 0 {
|
||||
rPath = c.Request.URL.RawPath
|
||||
if engine.UseRawPath && len(requestURL.RawPath) > 0 {
|
||||
rPath = requestURL.RawPath
|
||||
unescape = engine.UnescapePathValues
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user