mirror of
https://github.com/kataras/iris.git
synced 2025-12-22 04:17:03 +00:00
Update to 7.0.8 | iris.UseTemplateFunc -> Read HISTORY.md | Remove vendor folder because of: https://github.com/gavv/httpexpect/pull/34
Read HISTORY.md
This commit is contained in:
@@ -248,6 +248,14 @@ func (ctx *Context) Path() string {
|
||||
// RequestPath returns the requested path
|
||||
func (ctx *Context) RequestPath(escape bool) string {
|
||||
if escape {
|
||||
// NOTE: for example:
|
||||
// DecodeURI decodes %2F to '/'
|
||||
// DecodeQuery decodes any %20 to whitespace
|
||||
// here we choose to be query-decoded only
|
||||
// and with context.ParamDecoded the user receives a URI decoded path parameter.
|
||||
// see https://github.com/iris-contrib/examples/tree/master/named_parameters_pathescape
|
||||
// and https://github.com/iris-contrib/examples/tree/master/pathescape
|
||||
|
||||
return DecodeQuery(ctx.Request.URL.EscapedPath())
|
||||
}
|
||||
return ctx.Request.URL.Path
|
||||
|
||||
Reference in New Issue
Block a user