Engine.UnescapePathValues comment make me confused.
// If true, the path value will be unescaped.
// If UseRawPath is false (by default), the UnescapePathValues effectively is true,
// as url.Path gonna be used, which is already unescaped.
UnescapePathValues bool
It should be:
// If true, the path value will be unescaped.
// If UseRawPath is false (by default), the UnescapePathValues effectively is false,
// as url.Path gonna be used, which is already unescaped.
UnescapePathValues bool
refer to logic of code below:
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
unescape = engine.UnescapePathValues
}
// .....
}
Comment From: trainoasis
Seems nobody cares, but yeah, this needs to be changed. Perhaps make a PR?