1
0
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:
Gerasimos (Makis) Maropoulos
2017-01-10 14:21:49 +02:00
parent 893271bf02
commit 053588babd
4 changed files with 108 additions and 54 deletions

View File

@@ -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